All;
I setup a Foreign Server pointing to a pgpool instance. Subsequently
created Foreign Tables work as expected but they are never load
balanced, it seems they always run on the first available node. My
latest test used a pgpool config pointing to 2 standby's (no master) and
set both backend nodes to DISALLOW failovers
I have load balancing configured and I have statement_level_load_balance
= on
I set log_min_duration_statement to 0 on both backend nodes and ran
several selects from the local Foreign table, I see this in the logfile
from data node 0:
2025-10-21 08:52:53.876 MDT [58156] LOG: duration: 0.032 ms statement:
START TRANSACTION ISOLATION LEVEL REPEATABLE READ
2025-10-21 08:52:53.877 MDT [58156] LOG: duration: 0.063 ms parse
<unnamed>: DECLARE c1 CURSOR FOR
SELECT id FROM public.abc WHERE ((id < 15))
2025-10-21 08:52:53.877 MDT [58156] LOG: duration: 0.006 ms bind
<unnamed>: DECLARE c1 CURSOR FOR
SELECT id FROM public.abc WHERE ((id < 15))
2025-10-21 08:52:53.877 MDT [58156] LOG: duration: 0.043 ms execute
<unnamed>: DECLARE c1 CURSOR FOR
SELECT id FROM public.abc WHERE ((id < 15))
2025-10-21 08:52:53.878 MDT [58156] LOG: duration: 0.043 ms statement:
FETCH 100 FROM c1
2025-10-21 08:52:53.878 MDT [58156] LOG: duration: 0.005 ms statement:
CLOSE c1
2025-10-21 08:52:53.878 MDT [58156] LOG: duration: 0.016 ms statement:
COMMIT TRANSACTION
And I see this in the logfile from data node 1:
2025-10-21 08:52:27.675 MDT [58138] LOG: duration: 0.026 ms statement:
START TRANSACTION ISOLATION LEVEL REPEATABLE READ
2025-10-21 08:52:27.676 MDT [58138] LOG: duration: 0.020 ms statement:
COMMIT TRANSACTION
No matter how many selects I run from the Foreign Table I see the same
entries in the data node postgres log files and it never load balances
the queries from the Foreign Table
Anyone have any Ideas how to get this to load balance?
Thanks in advance