Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFQG3-0055gj-1s for pgpool-general@arkaria.postgresql.org; Wed, 22 Apr 2026 05:36:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFQG2-00Bqnp-0U for pgpool-general@arkaria.postgresql.org; Wed, 22 Apr 2026 05:36:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFQG1-00Bqni-34 for pgpool-general@lists.postgresql.org; Wed, 22 Apr 2026 05:36:17 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wFQFy-00000002CYH-0zMC for pgpool-general@lists.postgresql.org; Wed, 22 Apr 2026 05:36:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:Cc:To:Message-Id:Date:Sender :Reply-To:Content-ID:Content-Description; bh=qXaR/biyBMS2SHg6zqGZQMRSbkKY6quo0cWBsMvSOuM=; b=ZMklwTWVkXArcJ/CFxMiBNIbVS vrHybLHUW78/ne7SjB/cBilSHLTYR9Ww/O5swmLahYPR07I7eaR9LiP31v7CvKDEqyY+nvMgUREIT o1uBPI33Lgw0xP7loCtlwRN5e9BmqTjtZdYVDFeMU9UslghEMB2+ggdMpL9lHe51b7DNqsORfbUhG LssHXUzqU+cv/PWAdO0oUmnTeOC1SoGTN46wEp6avQjTZvAbnpyhNfwnj9Mn45NgZzQ0ll/3hMPBU hPl9om7wK3c50p1KGHRVfv/4whhNfznBLvjS2jEH4NJwkWA1zi7Dc7sAld6jh5d4kT/E2rh28R8is qCfLrfNA==; Received: from [2409:11:4120:300:2681:429e:31ec:d779] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFQFv-005qGo-1C; Wed, 22 Apr 2026 05:36:13 +0000 Date: Wed, 22 Apr 2026 14:36:06 +0900 (JST) Message-Id: <20260422.143606.1097654739437506696.ishii@postgresql.org> To: adam.blomeke@gmail.com Cc: pgpool-general@lists.postgresql.org Subject: Re: Routing of FDW Queries to Secondary databases From: Tatsuo Ishii In-Reply-To: References: X-Mailer: Mew version 6.8 on Emacs 29.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:2681:429e:31ec:d779 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > 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