-
Notifications
You must be signed in to change notification settings - Fork 88
Refactor pgcopydb for standby server support #655
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
Conversation
…ort_snapshot() function
5dfda37
to
a4a3024
Compare
a4a3024
to
cc30822
Compare
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.
Thanks for this work @gokhangulbiz !
I see the test is failing because of the pgcopydb table size table creation. I think we could also just run a SELECT query to fetch the information and populate our SQLite catalogs with the result of it, in a new table s_table_size
on the source catalogs. This would need to be done in yet another PR.
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 now needs a rebase on-top of the current main branch.
This pull request refactors the pgcopydb to add support for running on a standby server. It includes changes to the copydb_export_snapshot() function to handle standby server mode by setting isolation level and readOnly mode properly and creates a new test case named pagila-standby in the GHA workflow.
Please note that, with this PR,
pgcopydb
skips partitioning on standby servers (where pg_is_in_recovery() is true) because it cannot executeANALYZE
on a read-only database.