-
Notifications
You must be signed in to change notification settings - Fork 55
prepared statement "__pgdog_1" does not exist #184
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
Thanks for the report. Could you please run pgdog with |
This could be due to the configuration of the load balanced service - I'm seeing similar issues in my server logs:
I've also had an error complaining that the prepared statement used a different amount of paramters than the one expected. I'll try to have just one pgdog replica and report back |
(assuming this is the same error) Setup: 1x pgdog instance Config: [general]
host = "0.0.0.0"
port = 6432
workers = 4
default_pool_size = 5
min_pool_size = 3
passthrough_auth = "disabled"
query_timeout = 30000
connect_timeout = 30000
checkout_timeout = 5000
pooler_mode = "transaction"
prepared_statements = "disabled"
ban_timeout = 50
[[databases]]
name = "immich"
host = "immich-rw"
port = 5432
role = "primary"
[[databases]]
name = "immich"
host = "immich-ro"
port = 5432 Immich fails to start with:
Attached you can find pgdog's logs: |
Hmm. Try Edit: Yes, this is it. Looking at the logs this is what happens:
I think setting ...Although, I'm still trying to understand how you got the original error in the first place. |
Seems to work with
Should I open a separate issue to track this one? |
No it's fine, we can keep working off of this issue. I think the problem is two-fold:
|
No worries, thank you for your help 🎉 |
It happened again with the latest version from master.
Attached you can see the full trace of pgdog, including the error ( |
Enable transaction pooling:
Most features around load balancing that you're using don't work in session mode. Curious, do you need session pooling for something? I'm guessing it's for advisory locks? |
Oh, sorry, you're right. I switched back the pooler_mode to the wrong setting (again!). The reason why I switched to that was because I wanted to try to solve another issue in the pgdog / immich integration. I'll open a new issue as soon as I face the other issue again - in the meantime I added to my configuration a note to not use |
No problem! I'm going to add a warning on PgDog startup to let people know that session mode basically doesn't have any of the cool features. |
When used with Immich, pgdog fails to use the prepared statement (?)
pgdog.toml
Mind that I'm running pgdog in Kubernetes (3 replicas) - but this seems to happen also with a single replica.
The text was updated successfully, but these errors were encountered: