public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bob Ross <[email protected]>
To: Bo Peng <[email protected]>
Cc: [email protected]
Subject: Re: SQL query latency when using pgPool (v4.6.2)
Date: Wed, 22 Oct 2025 11:44:43 +0200
Message-ID: <CAHtZvrcnH0g7awgncXK=stDw1qL+V_VADK_4CB56no6nfo-Dng@mail.gmail.com> (raw)
In-Reply-To: <CAHtZvreZVpXOaiLqR8tigNwBC2xao0k9Rzfb-HAjDWPiYxw2tA@mail.gmail.com>
References: <CAHtZvrdvvk5YyyQMYoaE-2SY6J0SMQgLSgU1FvztGnAKLPRMLg@mail.gmail.com>
	<TYWP286MB263346EDD0F451CE5C8067BAF2F6A@TYWP286MB2633.JPNP286.PROD.OUTLOOK.COM>
	<CAHtZvreZVpXOaiLqR8tigNwBC2xao0k9Rzfb-HAjDWPiYxw2tA@mail.gmail.com>

++  [email protected] as missed it by accident.

On Wed, Oct 22, 2025 at 11:40 AM Bob Ross <[email protected]> wrote:

> Hi Bo,
>
> I was able to narrow down the issue and reported it as a bug:
> https://github.com/pgpool/pgpool2/issues/130
> All required information regarding versions is in the link. Affected
> pgPool is colocated with Postgres in the local (primary) region.
> See our pgpool.conf attached but it's quite irrelevant as this issue
> occurs with any parameter combination, as long as there are both local and
> remote nodes configured as backends.
> Logs are clean, the only difference is the delay between SQLs when remote
> nodes are attached (~20ms delay) and detached (~1ms delay).
>
> For us this is a blocker - we are unable to use pgPool effectively in
> multi-region Postgres deployment.
> Please let us know in case of any further questions.
>
> Thanks,
> Bob
>
> On Fri, Oct 17, 2025 at 9:42 AM Bo Peng <[email protected]> wrote:
>
>> Hi,
>>
>> Thank you for your question.
>>
>> Could you please share the cluster configuration?
>> (For example, the number of nodes, Pgpool-II/PostgreSQL versions, and
>> whether pgpool and PostgreSQL are running on the same host.)
>>
>> Also, could you please share your pgpool.conf file and the pgpool logs?
>>
>> ---
>> Bo Peng <[email protected]>
>> SRA OSS K.K.
>> TEL: 03-5979-2701 FAX: 03-5979-2702
>> Mobile: 080-7752-0749
>> URL: https://www.sraoss.co.jp/
>>
>>
>> ________________________________________
>> 差出人: Bob Ross <[email protected]>
>> 送信: 2025 年 10 月 8 日 (水曜日) 15:30
>> 宛先: [email protected] <
>> [email protected]>
>> 件名: SQL query latency when using pgPool (v4.6.2)
>>
>>
>>
>>
>> Hello,
>> I am currently testing SQL query performance using PgPool (v4.6.2) as a
>> load balancer, and I am observing approximately 18–20 ms latency between
>> SQL statements within the same transaction. Execution time on the
>> PostgreSQL backend servers is less than 0.5 ms.
>> It’s important to note that both the application and database servers are
>> located in the same cloud region, with network latency below 1 ms. PgPool
>> is colocated with the PostgreSQL backend servers.
>> For example, when executing a transaction containing 10 SQL statements,
>> the total execution time through pgPool is about 200 ms, as confirmed by
>> both application and pgPool logs. The delay consistently occurs between the
>> “Execute” and “Parse” phases. When connecting directly to the PostgreSQL
>> backends, the same transaction completes in about 10 ms, with roughly 1 ms
>> between SQL statements.
>> We have tested the following configurations:
>> - Switched from the extended query protocol to the simple query protocol
>> — for some queries this reduced inter-query latency to 2–3 ms, but for
>> others it increased to 30–40 ms due to additional parsing overhead.
>> - Adjusted various PgPool parameters related to load balancing and
>> connection pooling (e.g., load_balance_mode, statement_level_load_balance,
>> serialize_accept, disable_load_balance_on_write) and enabled debug logging,
>> but none of these changes brought a significant improvement.
>> Could you please advise whether there are additional pgPool parameters or
>> tuning approaches that could help improve throughput and reduce latency in
>> extended query protocol?
>> Thank you,
>> Bob
>>
>


view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: SQL query latency when using pgPool (v4.6.2)
  In-Reply-To: <CAHtZvrcnH0g7awgncXK=stDw1qL+V_VADK_4CB56no6nfo-Dng@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox