-
Notifications
You must be signed in to change notification settings - Fork 52
SELECT pg_advisory_lock
#134
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
I'm surprised that doesn't work on a replica. I thought advisory locks are in-memory. But yes, there are SELECT statements that write, so I agree, we should have a whitelist. I'm thinking of using |
Despite #181 - it still seems to be broken:
pgdog reports:
|
Could you show the lines from the log before the error as well? That's where the issue will be most likely. Thanks! |
Full log attached. Consider that I'm running 3 replicas of pgdog |
Awesome, thank you. The fix should be in #199. Couple follow up questions just to confirm that I caught the right bug:
I think the combination of these two things surfaced a bug in the implementation of the extended protocol on the server side of PgDog. Still would love to confirm that the diagnosis is correct. Cheers! |
Yes, following are my settings (that then get converted to their respective TOML version): pgdog:
replicaCount: 3
workers: 4
defaultPoolSize: 5
minPoolSize: 3
passthroughAuth: disabled
queryTimeout: 30000
connectTimeout: 30000
checkoutTimeout: 5000
logLevel: trace
poolerMode: session
banTimeout: 50 # 50ms
preparedStatements: disabled |
It seems like
pg_advisory_lock
is treated as a SELECT statement, thus the lock never gets acquired.Would it make sense to have a list of SQL statements that have side effects and that should therefore be whitelisted for being redirected to the write replicas?
The text was updated successfully, but these errors were encountered: