-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Postgrest error when connected to read replica database #547
Comments
@paulmin55 are you comfortable doing a build from source? |
If you can do the following test and confirm it works then i can push a PR for you that will allow the functionality you need.
then follow the link in my previous comment to build from source and run the resulting binary agains your read replica (any insert updates with this binary will fail on the master). |
@ruslantalpa I made the change to https://github.com/begriffs/postgrest/blob/master/src/PostgREST/App.hs#L77 with
and built from source using your link above. I can confirm that Postgrest is able to read from the read-replica database with this change OK. Thanks for your work on this, I look forward to this functionality change! |
This can be closed, it was fixed |
Hello,
I'm trying to run the lastest Postgrest v0.3.1.1 on Debian GNU/Linux 8 to use a Postgres 9.4.5 read replica db for read only queries but I'm getting this message when curling postgrest at:
Steps to reproduce:
I have no trouble using postgrest against the master db running Postgres 9.4.5, however I was hoping I can use Postgrest with the read replica db to perform read-only operations.
I've chatted with @ruslantalpa on glitter and he suspects it might be an issue with how postgrest issues the 'begin transaction' statement and requested that I put the postgres query logs as shown below. I appreciate any advise on this. Thank you!
Postgres read replica db query log when running curl http://localhost:3000:
Successful postgres query logs when running curl http://localhost:3000: on master db:
The text was updated successfully, but these errors were encountered: