public inbox for [email protected]  
help / color / mirror / Atom feed
From: Koshino Taiki <[email protected]>
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: About PG-Pool Load balance configuration
Date: Tue, 28 Oct 2025 07:55:49 +0000
Message-ID: <TYYP286MB29312718F3957A43EC83677E94FDA@TYYP286MB2931.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

You can exclude specific SQL statements from load balancing by using either the allow_sql_comment or primary_routing_query_pattern_list settings, in a similar way to the /*NO LOAD BALANCE*/ comment.

When allow_sql_comment is set to off, you can disable load balancing for a particular SQL statement by adding any comment at the beginning of the query.
For example:
/* any comment */ SELECT 1;

Also, you can specify SQL patterns that should not be load-balanced by using the primary_routing_query_pattern_list parameter.
For example:
primary_routing_query_pattern_list = 'SELECT 1\;'

For more details on how to configure these options, please refer to the official documentation: https://www.pgpool.net/docs/45/ja/html/runtime-config-load-balancing.html


Taiki Koshino<[email protected]>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/



________________________________
差出人: [email protected] <[email protected]>
送信: 2025 年 10 月 15 日 (水曜日) 10:24
宛先: [email protected] <[email protected]>
件名: About PG-Pool Load balance configuration


Dear pgpool-general,



I have already set up a cluster(base streaming replication) with three pgpool service(4.5.2) and three postgres nodes(17.5.2).

Also, I enable load balance mode because we need this.



In our config file of pgpool, I also set “statement_level_load_balance” to on and “allow_sql_comments” to off.

Now, I have some queries that I want to control whether I use load balance mode or not.



After I checked the documentation, I find out that I can add “/*NO LOAD BALANCE*/” before select query only in pgpool 4.2.

But can not add this comment before select query in pgpool 4.5.



https://www.pgpool.net/docs/42/en/html/runtime-config-load-balancing.html (have /*NO LOAD BALANCE*/)

https://www.pgpool.net/docs/45/en/html/runtime-config-load-balancing.html (do not have /*NO LOAD BALANCE*/))



Do you have any idea about this?


Best Regards,

Terence


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: About PG-Pool Load balance configuration
  In-Reply-To: <TYYP286MB29312718F3957A43EC83677E94FDA@TYYP286MB2931.JPNP286.PROD.OUTLOOK.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