| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
|---|---|
| To: | Colin 't Hart <colinthart(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
| Cc: | PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pgBadger and postgres_fdw |
| Date: | 2026-01-21 18:57:26 |
| Message-ID: | 0dba883ce1ae2faa2ef061605d2147d148b7f52c.camel@cybertec.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matt Magoffin | 2026-01-21 20:53:56 | Re: Collation with upper and numeric comparing in unexpected way |
| Previous Message | Adrian Klaver | 2026-01-21 17:20:02 | Re: pgBadger and postgres_fdw |