Skip to content

Edits for DDL replication/Mixed version prohibition - #6851

Merged
nidhibhammar merged 7 commits into
developfrom
DOCS-1566--pgd-pgd-ddl-replication-and-mixed-pg-version-upd
Aug 21, 2025
Merged

nidhibhammar merged 7 commits into
developfrom
DOCS-1566--pgd-pgd-ddl-replication-and-mixed-pg-version-upd

Conversation

@djw-m

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

Copy link
Copy Markdown
Contributor

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
@github-actions

github-actions Bot commented May 28, 2025 •

Copy link
Copy Markdown
Contributor

@github-actions
github-actions Bot temporarily deployed to pull request May 28, 2025 09:05 Inactive

@sumarjee sumarjee left a comment

Copy link
Copy Markdown
Contributor

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
Comment thread product_docs/docs/pgd/5.8/upgrades/upgrading_major_rolling.mdx Outdated

* **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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@sumarjee sumarjee May 29, 2025 •

Copy link
Copy Markdown
Contributor

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..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added notes on how you can mitigate the issue manually but indicated its better left till afterwards.

@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
@djw-m
djw-m force-pushed the DOCS-1566--pgd-pgd-ddl-replication-and-mixed-pg-version-upd branch from 694c804 to 132df59 Compare June 10, 2025 10:23
@github-actions
github-actions Bot temporarily deployed to pull request June 10, 2025 10:27 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request June 10, 2025 10:47 Inactive
@djw-m
djw-m requested review from ibarwick and removed request for ibarwick June 10, 2025 11:26
@github-actions
github-actions Bot temporarily deployed to pull request June 10, 2025 11:30 Inactive
@nidhibhammar

Copy link
Copy Markdown
Contributor

@sumarjee, Can you please look at this PR and let us know if there any action items pending here or we are good to merge?

@sumarjee

Copy link
Copy Markdown
Contributor

@ibarwick can you please confirm the changes done till now are good to merge?

@ibarwick ibarwick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

djw-m and others added 7 commits August 21, 2025 09:54
Signed-off-by: Dj Walker-Morgan <dj.walker-morgan@enterprisedb.com>
Signed-off-by: Dj Walker-Morgan <dj.walker-morgan@enterprisedb.com>
Signed-off-by: Dj Walker-Morgan <dj.walker-morgan@enterprisedb.com>
Signed-off-by: Dj Walker-Morgan <dj.walker-morgan@enterprisedb.com>
Signed-off-by: Dj Walker-Morgan <dj.walker-morgan@enterprisedb.com>
@nidhibhammar
nidhibhammar force-pushed the DOCS-1566--pgd-pgd-ddl-replication-and-mixed-pg-version-upd branch from 6313917 to 4f2f0a5 Compare August 21, 2025 04:24
@github-actions
github-actions Bot temporarily deployed to pull request August 21, 2025 04:28 Inactive
@nidhibhammar
nidhibhammar merged commit 2e839ce into develop Aug 21, 2025
@nidhibhammar
nidhibhammar deleted the DOCS-1566--pgd-pgd-ddl-replication-and-mixed-pg-version-upd branch August 21, 2025 04:35

This branch was previously deployed

1 inactive deployment
pull request — 4f2f0a59 Deployed Aug 21, 2025 by github-actions[bot]
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.

4 participants