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

unsupported startup parameter: statement_cache_mode #219

Open
TatyanaBol opened this issue Oct 10, 2023 · 1 comment
Open

unsupported startup parameter: statement_cache_mode #219

TatyanaBol opened this issue Oct 10, 2023 · 1 comment
Assignees

Comments

@TatyanaBol
Copy link

TatyanaBol commented Oct 10, 2023

Your Question

We connect the PostgreSQL server via Pgbouncer.
Our connection string (to the Pgbouncer) contains the parameter statement_cache_mode=describe to prevent the creation of prepared statements.
After a recent upgrade

gorm.io/driver/postgres  v1.3.9 => v1.5.3
gorm.io/gorm v1.23.8 => v1.25.4

our code stopped working with this error:

failed to connect to `host=pgbouncer.service user=pgbouncer_user database=metadata`: server error (FATAL: unsupported startup parameter: statement_cache_mode (SQLSTATE 08P01))

Could you please advise what this parameter should be replaced with?

The document you expected this should be explained

Expected answer

@noneymous
Copy link

noneymous commented Jan 12, 2024

It seems this got renamed in pgx and is now passed in as default_query_exec_mode=cache_describe

https://github.com/jackc/pgx/blob/master/conn.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants