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 1viaMb-00AREC-2x for pgsql-general@arkaria.postgresql.org; Wed, 21 Jan 2026 15:43:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1viaMb-007tmh-0A for pgsql-general@arkaria.postgresql.org; Wed, 21 Jan 2026 15:43:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viaMZ-007tmY-2y for pgsql-general@lists.postgresql.org; Wed, 21 Jan 2026 15:43:21 +0000 Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viaMX-001jwm-0N for pgsql-general@lists.postgresql.org; Wed, 21 Jan 2026 15:43:19 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 139E7EC00DB; Wed, 21 Jan 2026 10:43:14 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 21 Jan 2026 10:43:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1769010194; x=1769096594; bh=pIMDukAc0eSG+dVf87crA7auH+uOj1aUdcQ/zDUBe9o=; b= MEZ9J3V/CX24hVfA5GKgiKxTY7xe7Fg/TN8a8Wk07hnIsz1omxnE/O6Jz0t2Nc+q K/60v/gdH2rRAo8cjeSqwieKs2X2WR4exY4B+7ZNtE97iFuQNjBI2VusuAxn6T/I 8P4oaTVvId04WLmY01Rb44TMmAMWr9BtidrTHJk3LbbxtVQ/rr1z/yT5Kcnib4g/ gJ9nXKL7620QbbPrJRRkXGrB+6u27+hFyir56PH+EB3tSkSbHRGZVasIeg7JAoUL N4zZMtSn5+99Uwu6ccKX8SrHa2XpVxmJYMWU/mJy5/vwFvYXYqjK/DcfY3c6TSwO /KZnFPlmnVk9ZOweehxIhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1769010194; x=1769096594; bh=p IMDukAc0eSG+dVf87crA7auH+uOj1aUdcQ/zDUBe9o=; b=RAcFlIbi+TDsJ/gMZ SezAuuOvaHqRPoavVeXCHp22zHciz0WT9bE93bhWRrYySOgd5MXV9gjAXAN8JPPX OqPJIub1noSI5p6JttVDMtTim97JNv5xzGXPqzinA1GYr7cw/evlpyUBq4shIbRH xlAfSBuY2qlz0qRr0TV3IUQBz/+Fvd7B1A0g/GjiqyERGfmEYX2/Wk7CHgPQV97b nHRaeIjc0Fjcbqq8m549nMVGxQgkbHqSxKaJh48SWjq20guw4wssz3ZlK5ux7gSC iZ3FhmDWJgbsBkLxRkSI5y2BxccUXTCf3gH3C5yfTHBAnaYQVQj0YZBJkeKmpjvC 5Jtsg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddugeefieejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhirghn ucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqe enucggtffrrghtthgvrhhnpeffleegieefgfevudehtdfhkeeutdffjeevgeffgeejvedt hefgudeiteefheejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggp rhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegtohhlihhnth hhrghrthesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghl sehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Jan 2026 10:43:13 -0500 (EST) Message-ID: <31af308b-1689-44e8-ab88-f6a72722b38b@aklaver.com> Date: Wed, 21 Jan 2026 07:43:12 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pgBadger and postgres_fdw To: Colin 't Hart , PostgreSQL General References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/21/26 00:18, Colin 't Hart wrote: > Hi, > > One of my clients makes extensive use of postgres_fdw. After a migration > performance isn't great. pgBadger reports show the slowest queries all > being `fetch 100 from c2`. > > Anyone have any tricks for being able to associate those fetches with > the queries that were used when declaring the server-side cursor? This is going to need a lot more information. To start: 1) Migration of what and from what version to what version? 2) Where are the Postgres databases relative to each other on the network? 3) What versions of Postgres if not covered in 1. 4) If Postgres was what was being updated was an analyze done on the instances? 5) Show a complete query using EXPLAIN ANALYZE. 6) Define slow. > > Thanks, > > Colin -- Adrian Klaver adrian.klaver@aklaver.com