Subject: pgBadger and postgres_fdw

From: "Colin 't Hart" <[email-masked]>
Date: Wed, 21 Jan 2026 09:18:52 +0100

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?

Thanks,

Colin

---

From: Adrian Klaver <[email-masked]>
Date: Wed, 21 Jan 2026 07:43:12 -0800

On 1/21/26 00:18, Colin 't Hart wrote:
> 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.

-- 
Adrian Klaver
[email-masked]