Skip to content
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

postgres connector: replace pgxpool.Pool with pgx.Conn #1163

Merged
merged 3 commits into from
Jan 29, 2024
Merged

Conversation

serprex
Copy link
Contributor

@serprex serprex commented Jan 26, 2024

We currently create a pool per connector. This is not generally useful. Connection pools are best when you have one pool for the entire application, such as what we do for the catalog pool. Change connector to use pgx.Conn as connectors should not generally be used in a multithreaded way

In situations where you need a 2nd connection the pool would end up creating that 2nd connection, & in most scenarios that 2nd connection should be short lived (eg, 5 minute slot info checks) instead of having them idle most of the time

@iskakaushik
Copy link
Contributor

for connections established by PeerDB, can we also set application_name to peerdb as a part of this.

@serprex serprex merged commit 3c27655 into main Jan 29, 2024
7 checks passed
@serprex serprex deleted the less-pools branch January 29, 2024 18:18
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