Skip to content

Edits for DDL replication/Mixed version prohibition #6851

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

djw-m
Copy link
Contributor

@djw-m djw-m commented May 28, 2025

What Changed?

Added notes on the requirement not to perform DDL replication during mixed major version upgrades.

@djw-m djw-m self-assigned this May 28, 2025
@djw-m djw-m requested a review from a team as a code owner May 28, 2025 09:02
@djw-m djw-m added the deploy Add this label to a PR and it will automatically be deployed to netlify label May 28, 2025
Copy link
Contributor

github-actions bot commented May 28, 2025

@github-actions github-actions bot temporarily deployed to pull request May 28, 2025 09:05 Inactive
Copy link
Contributor

@sumarjee sumarjee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine.
I assume you plan to have separate commit for adding a note at correct place under DDL replication section.

@github-actions github-actions bot temporarily deployed to pull request May 28, 2025 09:39 Inactive
@djw-m djw-m requested a review from sumarjee May 28, 2025 15:59
* **Restart Postgres**
* Proceed to restart the PostgreSQL service:

`systemctl start postgres`

* **Update the extensions**
* The upgrade process checks for extension updates and generates a script named `updated_extensions.sql` in the current directory if needed.
This contains `ALTER EXTENSION` commands for any extensions that need updating after the upgrade. As these are DDL commands, if you have to run the script before all nodes are upgraded, you should turn off DDL replication temporarily to avoid issues with mixed major versions. If you can defer running the script until all nodes are upgraded, you can run it on each node after the upgrade of that node is complete.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: possible gotcha here, if someone thinks "yay, I'll just SET bdr.ddl_replication=off before \i-ing the update script" - the update script contains a \c / \connection command for each database that pg_upgrade thinks has extensions which need upgrading, which will start a new session, rendering the SET bdr.ddl_replication=off ineffective, like this:

postgres=# SET bdr.ddl_replication = off;
SET
postgres=# SHOW bdr.ddl_replication ;
 bdr.ddl_replication
---------------------
 off
(1 row)

postgres=# \c postgres
psql (18devel, server 17.4)
You are now connected to database "postgres" as user "postgres".
postgres=# SHOW bdr.ddl_replication ;
 bdr.ddl_replication
---------------------
 on
(1 row)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. @sumarjee is there an answer to this problem or do we have to tell people they need to edit the script?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not aware of this, we have to cross link to whatever way we recommend customer to turn off ddl_replication. @ibarwick can you please help with the correcting this as you have already explored on this.

Copy link
Contributor

@sumarjee sumarjee May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibarwick if it makes more sense to even not at all recommend running this script before all upgrades done, we can do that instead of having these problems..

@github-actions github-actions bot temporarily deployed to pull request May 29, 2025 09:04 Inactive
@djw-m djw-m changed the title Edits for DDL replicaction/Mixed version prohibition Edits for DDL replication/Mixed version prohibition May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy Add this label to a PR and it will automatically be deployed to netlify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants