[pgpool-general: 9126] Re: Load balancing for Agensgraph.

Tatsuo Ishii ishii at sraoss.co.jp
Tue Jun 11 10:04:12 JST 2024


> Hello:
>     We are proxying the Agensgraph behind PgPool. The Agensgraph is based
> on the Postgresql, so the communication works fine between the PgPool and
> the database server.
> However, in the Agensgraph the db use Cypher instead of the SQL, so there
> is no select or update keywords in our queries. Is it possible to use the
> load balancing too? For example,
> we can provide some hint for the PgPool.

There's a hint to *not* load balance but there's no hint to force
load balancing.

In my understanding Agensgraph is a fork of PostgreSQL adding some
their own SQL syntax such as "MATCH". Since Pgpool-II imports
PostgreSQL's standard SQL parser, it does not understand MATCH and
sends it to the primary PostgreSQL in this case.

One workaround I can think of is to create a function calling "MATCH"
and add it to "read_only_function_list". You call the function using
standard SELECT like "SELECT foo()". Pgpool-II will recognize that the
SELECT is read only query and load balances it.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp



More information about the pgpool-general mailing list