pgpool / pgpool2

This is the official mirror of git://git.postgresql.org/git/pgpool2.git. Note that this is just a *mirror* - we don't work with pull requests on github. Please subscribe to pgpool-hackers mailing list from our website and submit your patch to this mailing list.
https://www.pgpool.net
Other
305 stars 87 forks source link

Not use LadBalance except Comment #51

Closed itshikanov closed 2 weeks ago

itshikanov commented 2 months ago

hello. I'm try to not load balance all except specific queryes with comment. Not found specific config option, but i thought that regexp Negative Lookahead ^((?!LOAD_BALANCE).)*$ in primary_routing_query_pattern_list option will work. But it didn`t.

The part of my config is

load_balance_mode = on
statement_level_load_balance  = on
allow_sql_comments = on
primary_routing_query_pattern_list = '^((?!LOAD_BALANCE).)*$'

This regexp work well here for example https://regex101.com/. Accept all query except LOAD_BALANCE. But it did not work in pgpool2. This is BUG or expected behaviour?

If this is expected. How to do what i need?

tatsuo-ishii commented 1 month ago

primary_routing_query_pattern_list supports POSIX basic regular expressions. The negative lookahead is a PCRE extension and is not supported.

tatsuo-ishii commented 2 weeks ago

I am going to close this issue. If you have additional issues regarding this, please re-open the issue.

tatsuo-ishii commented 2 weeks ago

Issue closed.