public inbox for [email protected]  
help / color / mirror / Atom feed
About PG-Pool Load balance configuration
2+ messages / 2 participants
[nested] [flat]

* About PG-Pool Load balance configuration
@ 2025-10-15 01:24  [email protected]
  0 siblings, 1 reply; 2+ messages in thread

From: [email protected] @ 2025-10-15 01:24 UTC (permalink / raw)
  To: [email protected]

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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: About PG-Pool Load balance configuration
@ 2025-10-28 07:55  Koshino Taiki <[email protected]>
  parent: [email protected]
  0 siblings, 0 replies; 2+ messages in thread

From: Koshino Taiki @ 2025-10-28 07:55 UTC (permalink / raw)
  To: [email protected] <[email protected]>; +Cc: [email protected] <[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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-10-28 07:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-10-15 01:24 About PG-Pool Load balance configuration [email protected]
2025-10-28 07:55 ` Koshino Taiki <[email protected]>

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