8000 Use same connection in table copy worker. by shubhamdhama · Pull Request #542 · dimitri/pgcopydb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use same connection in table copy worker. #542

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 2 commits into from
Nov 29, 2023

Conversation

shubhamdhama
Copy link
Contributor

Currently for each table we are creating and closing a new connection to
the target. Using a same connection would save us some time and resource,
both at pgcopydb and target side.

Also, seting GUCs only once for a given target connection session would
again save us resources. This would also reduce 8 extra log lines that are
currently produced for each table which otherwise would produce noise if we
have say, 10K tables.

Follow-up: Use the same connection for INDEX worker where same connection is even more useful.

@shubhamdhama
Copy link
Contributor Author

It's a follow-up of #541 I'll remove 07c8b66 commit once that PR is merged.

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.

Small changes before we can merge. Thanks!

Currently for each table we are creating and closing a new connection to
the target. Using a same connection would save us some time and resource,
both at pgcopydb and target side.

Also, seting GUCs only once for a given target connection session would
again save us resources. This would also reduce 8 extra log lines that are
currently produced for each table which otherwise would produce noise if we
have say, 10K tables.
@shubhamdhama shubhamdhama force-pushed the same-connection-for-target branch from 1dad3f1 to 0a44e06 Compare November 28, 2023 12:46
@shubhamdhama shubhamdhama requested a review from dimitri November 28, 2023 12:46
@dimitri dimitri merged commit 5d6ae50 into dimitri:main Nov 29, 2023
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.

2 participants
0