Re: pgBadger and postgres_fdw - Mailing list pgsql-general

From Laurenz Albe
Subject Re: pgBadger and postgres_fdw
Date
Msg-id 0dba883ce1ae2faa2ef061605d2147d148b7f52c.camel@cybertec.at
Whole thread Raw
In response to Re: pgBadger and postgres_fdw  ("Colin 't Hart" <colinthart@gmail.com>)
List pgsql-general
On Wed, 2026-01-21 at 17:12 +0100, Colin 't Hart wrote:
> My question is how to identify which connections / queries from postgres_fdw are
> generating the `fetch 100 from c2` queries, which, in turn, may quite possibly
> lead to a feature request for having these named uniquely.

I would inverstigate that on the remote database.

If the user that postgres_fdw uses to connect is remote_user, you could

  ALTER ROLE remote_user SET log_min_duretion_statement = 0;

Then any statements executed through postgres_fdw would be logged.

If you have %x in log_line_prefix, you can find the DECLARE statement that declared
the cursor that takes so long to fetch.  Not very comfortale, but it should work.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pgBadger and postgres_fdw
Next
From: Matt Magoffin
Date:
Subject: Re: Collation with upper and numeric comparing in unexpected way