<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>On 10/31/24 07:21, Tatsuo Ishii wrote:</p>
    <blockquote type="cite"
      cite="mid:20241031.152126.186677380351373753.ishii@postgresql.org">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">So that we
can finally have the one and only pooler that we need which does it
all? (load balancing, pooling, read-write split, etc)
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">Just out of curiosity, those features (load balancing, pooling,
read-write split) are already available in existing Pgpool-II
versions. What feature do you think lacking in current Pgpool-II
versions?
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">I meant more efficient pooling (like pgbouncer), transaction-level
pooling. Speaking of which pgbouncer also now supports prepared
statements , any plans for prepared statements in Pgpool-II ?
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
For more efficient pooling, Usama's work should be useful and will be
in Pgpool-II 4.6.  Unfortunately the transaction-level connection
pooling will not be available in 4.6. According to Usama, he needs
more time to make it mature.
</pre>
    </blockquote>
    Good news, thank you!<br>
    <blockquote type="cite"
      cite="mid:20241031.152126.186677380351373753.ishii@postgresql.org">
      <pre wrap="" class="moz-quote-pre">
In my understanding prepared statements are already supported in
Pgpool-II 4.5.
</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">Allow to load balance PREPARE/EXECUTE/DEALLOCATE.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre"><a class="moz-txt-link-freetext" href="https://www.pgpool.net/docs/latest/en/html/release-4-5-0.html">https://www.pgpool.net/docs/latest/en/html/release-4-5-0.html</a>

Or do you mean something else?</pre>
    </blockquote>
    <p>I mean the prepared statements via the protocol level, not via
      PREPARE/EXECUTE. I don't know the specifics about upcoming 4.6,
      but I'll describe what happens now in <a
        href="https://www.pgbouncer.org/2024/08/pgbouncer-1-23-1">PgBouncer
        1.23.1</a> . :
      <a class="moz-txt-link-freetext" href="https://www.pgbouncer.org/config.html#max_prepared_statements">https://www.pgbouncer.org/config.html#max_prepared_statements</a> <br>
    </p>
    <p>It is a mechanism to cope with prepared statements in transaction
      and statement pooling mode, which in Pgpool-II still is not
      implemented. Statement-pooling mode, IMHO is irrelevant to the
      classical/common PostgreSQL use case, but the transaction-level
      pooling mode is very useful. And in order to support
      transaction-pooling with prepared statements, the pooler must keep
      track of all prepared statements coming from all clients, identify
      unique queries, encode them in a internal manner, and then take
      care that each client that has requested a prepared statement has
      this statement ready in the server, even if this a newly created
      server with no knowledge of the prepared statement. We haven't
      tested it yet, though.<br>
    </p>
    <blockquote type="cite"
      cite="mid:20241031.152126.186677380351373753.ishii@postgresql.org">
      <pre wrap="" class="moz-quote-pre">

Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: <a class="moz-txt-link-freetext" href="http://www.sraoss.co.jp/index_en/">http://www.sraoss.co.jp/index_en/</a>
Japanese:<a class="moz-txt-link-freetext" href="http://www.sraoss.co.jp">http://www.sraoss.co.jp</a>
</pre>
    </blockquote>
  </body>
</html>