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

[postgrenosql] Each thread gets its own connection to the database. #1691

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xwkuang5
Copy link

@xwkuang5 xwkuang5 commented Dec 1, 2023

While the PostgreSQL JDBC driver is thread-safe
(ref), multiple threads using the same connection returned from the driver will still block each other.

This change updates the DB client implementation to have each thread maintain their own driver and connection. This is useful in the transaction phase to improve the throughput performance of a single load driver process without having to resort to using multiple processes.

database.

While the PostgreSQL JDBC driver is thread-safe
([ref](https://www.postgresql.org/docs/7.4/jdbc-thread.html)), multiple
threads using the same connection returned from the driver will still
block each other. This change updates the DB client implementation to
have each thread maintain their own driver and connection.
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.

1 participant