feat: dynamic loading of PostgreSQL extensions#7991
Merged
gbartolini merged 29 commits intomainfrom Jul 24, 2025
Merged
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
38e8cf4 to
6dcce2d
Compare
91e9ea7 to
9579952
Compare
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
See #7991 (comment) Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
gbartolini
approved these changes
Jul 24, 2025
2 tasks
4 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This feature allows you to mount a PostgreSQL extension, packaged as an OCI-compliant container image, as a read-only, immutable volume inside an instance pod.
The new
.spec.postgresql.extensionsstanza of aClusterresource accepts an ordered list of extension images to be added to the PostgreSQL cluster. Each item in theextensionsstanza is identified bynameand provides the following options:extension_control_path: A list of relative paths within the container image to be appended to PostgreSQL’sextension_control_path, allowing it to locate extension control files (default:share).dynamic_library_path: A list of relative paths within the container image to be appended to PostgreSQL’sdynamic_library_path, enabling it to locate shared library files for extensions (default:lib).ld_library_path: A list of relative paths within the container image to be appended to theLD_LIBRARY_PATHenvironment variable of the instance manager process, allowing PostgreSQL to locate required system libraries at runtime (default: empty).Each image volume is mounted at
/extensions/<EXTENSION_NAME>. By default, CloudNativePG automatically manages the relevant PostgreSQL GUCs, setting:extension_control_pathto/extensions/<EXTENSION_NAME>/share, allowing PostgreSQL to locate any extension control file within/extensions/<EXTENSION_NAME>/share/extensiondynamic_library_pathto/extensions/<EXTENSION_NAME>/libThese values are appended in the order in which the extensions are defined in the
extensionslist, ensuring deterministic path resolution within PostgreSQL.Requirements:
extension_control_pathoption)ImageVolumefeature enabledCloses #7188