8000 Refactor pgcopydb for standby server support by gokhangulbiz · Pull Request #655 · dimitri/pgcopydb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 47 commits into from
May 30, 2024

Conversation

gokhangulbiz
Copy link
Contributor
@gokhangulbiz gokhangulbiz commented Jan 26, 2024

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 execute ANALYZE on a read-only database.

@gokhangulbiz gokhangulbiz marked this pull request as draft January 26, 2024 14:22
Copy link
Owner
@dimitri dimitri left a 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.

@gokhangulbiz gokhangulbiz marked this pull request as ready for review February 29, 2024 05:58
@gokhangulbiz gokhangulbiz requested a review from dimitri February 29, 2024 05:58
Copy link
Owner
@dimitri dimitri left a 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.

@dimitri dimitri merged commit 120601c into dimitri:main May 30, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0