-
Notifications
You must be signed in to change notification settings - Fork 914
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
Add multihost connstring support #714
base: master
Are you sure you want to change the base?
Conversation
PS.: yay! travis build number 1000! 🍾 🎉 |
Hi! When this pull request will be in production? Or works was stop? |
Yeah, I have the same question. Is it going to production anytime soon? |
I have to rebase and fix the small conflict introduced by further work on master. Unfortunately I'm currently on paternity leave and probably won't get around to it in the next few weeks. After that someone with merge access still has to take a look and see if this PR is an acceptable approach at all. Since there was zero feedback up until this point, I'm not sure how long this will take. |
Is this issue still being worked on? |
I'm unlikely to review this soon, sorry. You'll have to maintain your own fork for now. |
I'm not aware of any reviewers who are active on this project (including myself), so there's really no one to hand it off to. |
The primary golang postgres connection library has zero active maintainers? That's...wild. Have you considered reaching out to Golang mailing groups for assistance in maintaining the lib, or similar? I don't want to suggest that you personally should have the responsibility for upkeep here, to be sure, but it's pretty astounding to me that nobody has picked this up. I'd be open to helping with some housekeeping, but can't say I currently have a particularly deep domain expertise here. |
It is indeed sad this has no active maintainers. Open source has its problems. |
Agreed this is the nature of the beast, but a part of that responsibility is to hand over the reigns when one cannot self-maintain any further. I assume you are prepared to do that. I'm a willing and able participant. I'll talk to @fdr to see if he can give me access, I work closely with the Citus Data folks. |
Sure. I don't have permissions to grant permissions so I'm not able to do anything. A few of us from cockroach just asked the last time this was a problem and they gave us commit here. We just keep limping along. |
Roger that. I also wonder if most people's alternative has been to go with and contribute to |
I use pgx for all of my new work, so yes. We should all do that. |
I'm down with that. |
AFAICT neither go-pg nor pgx currently support the equivalent of this PR, though I see @bpicolo already suggested a similar approach here jackc/pgx#299 and there's at least initial prodding here go-pg/pg#999. @jnicholls if by any chance you decide to come back to this PR, let me know and I'll give you access to my fork. Would gladly take the help! 👍 |
To reiterate are you guys essentially saying this isn't going to get merged because lack of contributors to the project? And if that is the case how will the upstream projects using the library know that the project is slowly dying? Reason, I ask is because I was interested in this feature because I use Vault with the Postgres backend and we excited when we found this PR. (We as in my team that manages the Vault instances) |
And if that's the case, should/can we get a warning into the Readme? This lib is by far the most google-able postgres lib for go (and definitely has the most Github stars) |
I've now gone ahead and do this: https://github.com/hannesdejager/pgdfailwrap since I could also not find a go solution to this. Perhaps its usable for some but it really only caters for my use-case. |
For what it's worth, I think pgx is fine software. |
Is there a chance that this pull request will get merged soon? Is there anything we can do to help with this pull request? |
This looks like a simple enough patch. Would the maintainers be willing to merge this given someone can review and test it and share a report? |
@knadh hey, thanks for pinging. @lib/pq-committers, anyone up for this one? It seems overdue. Maybe I would do it myself, but I don't have time to react to any consequences/defects. |
This PR is a first attempt at supporting the newer multi-host features of libpq 10.
It adds support for providing multiple hosts in the connstring (either URL or
key=value
form) and also for thetarget_session_attrs
connection parameter.It includes a few noteworthy changes, which could use some further scrutiny:
pg_basebackup
. This decision can be revisited, if testing for older versions is still deemed necessary (or the patch can be split into a separate PR)errorSlice
, which also implements theerror
interface. To keep backwards compatibility for people expecting specific error types, a special case forlen(hosts)==1
was added.read-write
mode. For this, we also follow libpq's example and execute asimpleQuery
during connection establishment, checking the output ofSHOW transaction_read_only
.TestOpenURL
test was changed to not start a transaction, instead executing aSHOW server_version
. This is needed for testing connections to the secondary node.PTAL
fixes #683