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

Use protocol level prepare instead of PREPARE sql commands #2276

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

joto
Copy link
Collaborator

@joto joto commented Dec 12, 2024

Introduce a new pg_conn_t::prepare() function which is now used in several places instead of pg_conn_t::exec() with a SQL PREPARE command.

This does not yet replace all places where PREPARE is used, the rest will come in a later commit.

This is to make osm2pgsql work with some connection poolers that have problems with prepared statements. For some background see #2118 and https://www.crunchydata.com/blog/prepared-statements-in-transaction-mode-for-pgbouncer

Introduce a new pg_conn_t::prepare() function which is now used in
several places instead of pg_conn_t::exec() with a SQL PREPARE command.

This does not yet replace all places where PREPARE is used, the rest
will come in a later commit.

This is to make osm2pgsql work with some connection poolers that have
problems with prepared statements. For some background see
osm2pgsql-dev#2118 and
https://www.crunchydata.com/blog/prepared-statements-in-transaction-mode-for-pgbouncer
@joto joto force-pushed the protocol-level-prepare branch from e15ecee to f4ace45 Compare December 12, 2024 13:08
@lonvia lonvia merged commit 060656a into osm2pgsql-dev:master Dec 12, 2024
24 checks passed
@joto joto deleted the protocol-level-prepare branch December 13, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants