[Tile-serving] [osm2pgsql-dev/osm2pgsql] Use protocol level prepare instead of PREPARE sql commands (PR #2276)

Jochen Topf notifications at github.com
Thu Dec 12 10:25:23 UTC 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 https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2118 and https://www.crunchydata.com/blog/prepared-statements-in-transaction-mode-for-pgbouncer
You can view, comment on, or merge this pull request online at:

  https://github.com/osm2pgsql-dev/osm2pgsql/pull/2276

-- Commit Summary --

  * Use protocol level prepare instead of PREPARE sql commands

-- File Changes --

    M src/expire-output.cpp (20)
    M src/flex-table.cpp (14)
    M src/middle-pgsql.cpp (9)
    M src/pgsql.cpp (14)
    M src/pgsql.hpp (20)
    M src/properties.cpp (6)
    M src/table.cpp (5)

-- Patch Links --

https://github.com/osm2pgsql-dev/osm2pgsql/pull/2276.patch
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2276.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2276
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/pull/2276 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20241212/d5abbb07/attachment.htm>


More information about the Tile-serving mailing list