-
Notifications
You must be signed in to change notification settings - Fork 209
Conversation
CLAassistant
commented
Jun 18, 2026
CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
levkk
commented
Jun 18, 2026
Ah yeah, my bad, I meant this: https://docs.pgdog.dev/configuration/pgdog.toml/general/#read_write_split
It's two lines above where you put the new config in pgdog-config/general.rs.
stewart-glabs
commented
Jun 18, 2026
I thought that might be a good place to put this config, but it overshadows the behavior of include_primary_if_replica_banned. but if you think that's a better place, I can move it over.
levkk
commented
Jun 18, 2026
Should be fine. The two are super similar.
stewart-glabs
commented
Jun 18, 2026
Ok cool, I'll make the change, probably early next week.
Uh oh!
There was an error while loading. Please reload this page.
Fixes: #1046
Hey I work with @gl-jkeys who reported this ticket. So, same motivation. I want to add a read replica to my setup but make it opt-in for all queries. All queries go to primary, unless a comment or parameter suggests go to a replica.
@levkk suggested adding this to
load_balancing_strategyhowever this setting is for how to pick a among replicas. Prefer primary is about the default role. I decided to use a separate configuration. Let me know if I'm off base here.There are comprehensive tests. I also created an integration test, to be cautious and cover all bases.
I could not figure out how to get all integration tests to pass. There seems to be some dependencies missing that are not documented. What do you suggest about this?
PS I used ai to help me write, and review the code and to make sure I'm following the repo guidelines, style and convention.