Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config_pgcluster: Create extensions after restarting Postgres #761

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

vitabaks
Copy link
Owner

@vitabaks vitabaks commented Sep 18, 2024

Previously, the role for creating extensions was executed before the restart, which could result in errors.

Example:

failed: [10.129.50.35] (item={'ext': 'pg_cron', 'db': 'postgres', 'schema': 'pg_catalog'}) => {"ansible_loop_var": "item", "changed": false, "item": {"db": "postgres", "ext": "pg_cron", "schema": "pg_catalog"}, "msg": "Management of PostgreSQL extension failed: pg_cron can only be loaded via shared_preload_libraries\nHINT:  Add pg_cron to the shared_preload_libraries configuration variable in ********ql.conf.\n"}

Now, extensions will be created after the restart.

Note

If the pending_restart variable is set to true, the cluster will be restarted if required (e.g., when changing shared_preload_libraries).

…uired)

Previously, the role for creating extensions was executed before the restart, which could result in errors, example:

failed: [10.129.50.35] (item={'ext': 'pg_cron', 'db': 'postgres', 'schema': 'pg_catalog'}) => {"ansible_loop_var": "item", "changed": false, "item": {"db": "postgres", "ext": "pg_cron", "schema": "pg_catalog"}, "msg": "Management of PostgreSQL extension failed: pg_cron can only be loaded via shared_preload_libraries\nHINT:  Add pg_cron to the shared_preload_libraries configuration variable in ********ql.conf.\n"}

Now, extensions will be created after the restart.
Note: If the `pending_restart: true` variable is set, the cluster will be restarted if required (e.g., when changing `shared_preload_libraries`).
@vitabaks vitabaks added the enhancement Improvement of the current functionality label Sep 18, 2024
@vitabaks vitabaks self-assigned this Sep 18, 2024
@vitabaks vitabaks changed the title config_pgcluster: Create extensions after restarting Postgres (if req… config_pgcluster: Create extensions after restarting Postgres Sep 18, 2024
@vitabaks vitabaks merged commit 278ba61 into master Sep 18, 2024
15 checks passed
@vitabaks vitabaks deleted the create-extensions-after-restart branch September 18, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of the current functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant