Re: BUG #17146: pg_dump statements are going into pg_stat_statements in 13.4 - Mailing list pgsql-bugs

From hubert depesz lubaczewski
Subject Re: BUG #17146: pg_dump statements are going into pg_stat_statements in 13.4
Date
Msg-id 20210816092345.GA8258@depesz.com
Whole thread Raw
In response to BUG #17146: pg_dump statements are going into pg_stat_statements in 13.4  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Sun, Aug 15, 2021 at 05:30:52PM +0000, PG Bug reporting form wrote:
> I have just updated to 13.4 and I have noticed that "COPY" statements that
> are produced by pg_dump appear in pg_stat_statements view.

Of course they do. These are statements.

> You can imagine that the copy statements are slower than all my other
> statements, so they come up as the first and most expensive statements in
> pg_stat_statements.
> This is a new behaviour in 13.4 and hasn't existed in 13.3 and prior.

No, it's not.

I just tested to be 100% sure, on 12.6 and pg_dump queries are in
pg_stat_statements.

Just consider what would you do if excessive dumping was causing
problems. You want these to be gone from stats?

If you don't care about COPY, then filter it out using WHERE clause.

Best regards,

depesz




pgsql-bugs by date:

Previous
From: "Zhéxué M. @Study"
Date:
Subject: Re: Postgresql - Service hangs....
Next
From: Julien Rouhaud
Date:
Subject: Re: BUG #17146: pg_dump statements are going into pg_stat_statements in 13.4