-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Replica/master/slave connect #932
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
Comments
This pg driver does not handle directly clusters as you described. You should create a little wrapper that will create a master pool and a pool for each of your slaves, and a functions to fetch a connections from master or slave. |
Is there any need of merging this functionality into pg? |
cc @brianc |
@1999 Most database libraries support this kind of a setup, so I think it makes sense for this to be added. |
👍 |
I am running into a need to implement this as well. I am going to write a higher level abstraction based on a principal that |
Any updates on this, how to achieve master and slave using node pg, or anyone who has written wrapper as suggested. This is very basic usecase and it should be in pg itself. |
Any updates ? Too many years past since the issue opened. JDBC supports this feature. |
Feel free to open a PR with the changes. As long as there are test I will
most likely merge it!
…On Tue, Aug 6, 2024 at 3:26 AM ozkan-meu ***@***.***> wrote:
Any updates ? Too many years past since the issue opened. JDBC supports
this feature.
—
Reply to this email directly, view it on GitHub
<#932 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMHIKL362JBTLULOCTNR3ZQB3CFAVCNFSM6AAAAABMBWXEGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQGU3TCMJXGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hey,
We have a simple replicaset/master-slave configuration of Postgresql: 1 master and 2 slaves. Right now I can't see any option to connect to only master and make insert ops there. Or am I missing smth?
The text was updated successfully, but these errors were encountered: