public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adam Blomeke <[email protected]>
To: Tatsuo Ishii <[email protected]>
Cc: [email protected]
Subject: Re: Routing of FDW Queries to Secondary databases
Date: Thu, 23 Apr 2026 13:55:19 -0400
Message-ID: <CAG9AmshakNU03or2vGtrE96knScV6qr7nAepfyHPfX7zQ2L0VQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAG9AmsgiQgDhQWZ6viVEWwtX4h_ukjvgN=DhiWKKCAvHMyC=yQ@mail.gmail.com>
	<[email protected]>

A lot of our connections operate over foreign data wrappers. We have very
large datasets and we try to segment our analysts off from the actual data
sources. I'd like to be able to balance my read-only FDW queries onto a
secondary database. I've got 2 PGPool instances already, and this would be
beneficial on one of them along with this third one. I realize I'm only one
guy, but having this would be really useful in my implementation.

Cheers,
Adam

On Tue, Apr 21, 2026, 22:36 Tatsuo Ishii <[email protected]> wrote:

> > Hi,
> >
> > I understand that FDW queries don't get routed to the secondary databases
> > since they occur within FETCH blocks.
>
> Yes, currently Pgpool-II does not load balance DECLARE CURSOR/FETCH
> (it's documented).  The difficulty is, once DECLARE CURSOR is routed
> to particular server, subsequent FETCH must be routed to the server
> too. Pgpool-II has to track this.
>
> > Is there any planned work to change
> > this.
>
> As far as I know I haven't noticed a request to implement load
> balancing for DECLARE CURSOR/FETCH up to now.
>
> > I have one database I'm about to work on clusterizing, but this
> > limitation makes pgpool impractical as the read side is only accessed via
> > FDWs in all but a very small set of circumstances.
> >
> > Again, I realize the existing limitation; I'm just curious if there's any
> > work on the horizon to add that capability. If not, I will likely need to
> > explore other alternatives for one of the clusters I'm working on.
>
> If there's a strong demand, developers will discuss on implementing
> the feature for the next major release of Pgpool-II (planned to be
> released by the end of this year).
>
> Regards,
> --
> Tatsuo Ishii
> SRA OSS K.K.
> English: http://www.sraoss.co.jp/index_en/
> Japanese:http://www.sraoss.co.jp
>


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: Routing of FDW Queries to Secondary databases
  In-Reply-To: <CAG9AmshakNU03or2vGtrE96knScV6qr7nAepfyHPfX7zQ2L0VQ@mail.gmail.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