feat: add support for configuring PostgreSQL extensions via Image Volume#6546
feat: add support for configuring PostgreSQL extensions via Image Volume#6546NiccoloFei wants to merge 11 commits intocloudnative-pg:mainfrom
Conversation
|
❗ By default, the pull request is configured to backport to all release branches.
|
12f8aca to
3300af6
Compare
|
The |
|
/test limit=local feature_type=smoke |
|
@NiccoloFei, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/14946124968 |
pkg/postgres/configuration.go
Outdated
| // Set all ExtensionControlPaths | ||
| setExtensionControlPath(info, configuration) | ||
|
|
||
| // Set all DynamicLibraryPaths | ||
| setDynamicLibraryPath(info, configuration) |
There was a problem hiding this comment.
Is it guaranteed that we'll always have both extensionControlPath and dynamicLibraryPath if we are inside the block?
There was a problem hiding this comment.
@hossain-rayhan I think so, given that we want to adhere to the PGXS standard declared in https://www.postgresql.org/docs/devel/extend-pgxs.html, for which every extension (even the most basic ones) will have extension control and SQL files in /share and the shared library in /lib. So we'll have to set both those GUCs to allow PG to find the extension's files. Although I'm wondering how the build infra would behave in case of pure-SQL extensions. I'll try to test/investigate this specific use case, but I think the worst that could happen is that we'd end up setting a useless path inside dynamic_library_path.
Were you thinking of a specific scenario, or was it just a generic question?
bb910ea to
612fec1
Compare
bb4713d to
336c822
Compare
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Also, automatically manage extension_control_path and dynamic_library_path. Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
|
Closing this PR as its purpose was to serve as exploration work for the new feature. |
Add support to allow setting up PostgreSQL extensions via container images, taking advance of the
ImageVolumeVolumeSource of Kubernetes and the new proposed GUC of PostgreSQLextension_control_path.Introduce a new API field
Extensionsin thecluster.Spec.PostgresConfigurationstanza, which takes an array of PostgreSQL extensions which should be added to the Cluster.