[pgpool-general: 667] pgpool 3.1.2 - reusing named prepared statements

Dan Biagini d.biagini at gmail.com
Thu Jun 28 05:08:53 JST 2012


I am evaluating postgres connection poolers (pgbouncer and pgpool),
specifically I’m looking for a way to allow reusing prepared
statements on the backend connections across all frontend client
connections.

The use-case is for a handful of complex but performance critical
queries which get executed by short lived client processes.  So
ideally client app code would connect to pooler, and check if the
prepared statement already exists for this connection (via
pg_prepared_statement table).  If it doesn’t the client will create
the statement(s), and execute them, then disconnect, but leaving the
prepared statement allocated on the backend for use by a subsequent
client connection.

It doesn’t seem to work with pgpool (I found pgpool was calling
DEALLOCATE in the connection cleanup code, regardless of whether it
was configured in the reset_query_list configuration).

Is this a known behavior?

Thanks!


More information about the pgpool-general mailing list