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

Routing reads to one host, writes to another host #486

Closed
jpike88 opened this issue May 13, 2023 · 0 comments
Closed

Routing reads to one host, writes to another host #486

jpike88 opened this issue May 13, 2023 · 0 comments
Labels
postgres Related to PostgreSQL question Further information is requested

Comments

@jpike88
Copy link

jpike88 commented May 13, 2023

I know this is maybe a niche situation, but I'm looking to move to kysley from knex.

The situation is that I have a pg master and a replica, and I want

The workaround in Knex is here, it involves creating two Knex clients (one master, one replica), and then creating a third 'wrapper' client, that we monkey patch to route the query to the appropriate 'real' client.
knex/knex#2253 (comment)

The above solution is elegant and works fine but is not part of Knex documented capabilities.

Is there an equivalent strategy I can use with Kysley?

@igalklebanov igalklebanov added question Further information is requested postgres Related to PostgreSQL labels May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postgres Related to PostgreSQL question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants