-
Notifications
You must be signed in to change notification settings - Fork 283
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
base: develop
Are you sure you want to change the base?
Edits for DDL replication/Mixed version prohibition #6851
Conversation
Signed-off-by: Dj Walker-Morgan <[email protected]>
There was a problem hiding this 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.
Signed-off-by: Dj Walker-Morgan <[email protected]>
* **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. |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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..
What Changed?
Added notes on the requirement not to perform DDL replication during mixed major version upgrades.