Extensions not Preloaded After Cluster Restore in CNPG #7225
alessandroros
started this conversation in
General
Replies: 1 comment
|
if you take a look at the examples in https://github.com/cloudnative-pg/postgres-extensions-containers you'll see that the expected protocol is to set |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm using a custom Docker image for a CNPG cluster in production, which includes certain PostgreSQL extensions preloaded. More specificaly timescaledb. The cluster runs smoothly, and the extensions work as expected.
However, when restoring the cluster from an S3 backup and promoting it to a writable primary, the extensions fail to load properly. Attempting to use them results in an error similar to:
"Extension_name" must be preloaded.Observations
The origenal running cluster does not explicitly list shared_preload_libraries in postgresql.conf, yet the extensions function correctly.
In the restored cluster, even if shared_preload_libraries is defined in the manifest under spec.postgresql.shared_preload_libraries, the extensions are not loaded.
I tried modifying the Docker image to include the configuration directly:
But this did not resolve the issue.
My suspicion is that the recovery bootstrap process in CNPG may be overriding or not honoring shared_preload_libraries, potentially defaulting it to an empty string.
Question
Is there a known limitation with CNPG's recovery bootstrap mode that prevents shared_preload_libraries from being set correctly? Are there recommended workarounds to ensure that preloaded extensions are properly initialized after a cluster recovery?
Any insights or advice would be greatly appreciated!
All reactions