From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Move pg_stat_statements query jumbling to core. |
Date: | 2021-04-08 16:39:49 |
Message-ID: | 20210408163949.bni5zxhwtqnh5rqh@nol |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Thu, Apr 08, 2021 at 11:16:24AM -0400, Bruce Momjian wrote:
> On Thu, Apr 8, 2021 at 02:11:02PM +0800, Julien Rouhaud wrote:
> > > oh, I think it's because parallel workers now have the queryid of the main
> > > query. Probably ignoring parallel workers in the executor end hook will fix
> > > the problem. I'll look at it as soon as I will be back home.
> >
> > That was indeed the problem. I think the best is to entirely ignore parallel
> > workers in pg_stat_statements, as done in attached patch, which fixes the
> > regression tests with force_parallel_mode = regress.
>
> > >From 45885bee58ab98c33b8e75edec13e08851523444 Mon Sep 17 00:00:00 2001
> > From: Julien Rouhaud <julien(dot)rouhaud(at)free(dot)fr>
> > Date: Thu, 8 Apr 2021 13:59:43 +0800
> > Subject: [PATCH v1] Ignore parallel workers in pg_stat_statements.
> >
> > Oversight in 4f0b0966c8 which exposed queryid in parallel workers. Counters
> > are aggregated by the main backend process so parallel workers would report
> > duplicated activity, and could also report activity for the wrong entry as they
> > are only aware of the top level queryid.
> >
> > Author: Julien Rouhaud
> > Reported-by: Andres Freund
> > Discussion: https://postgr.es/m/20210408051735.lfbdzun5zdlax5gd@alap3.anarazel.de
>
> Patch applied.
Thanks Bruce!
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-04-08 17:57:45 | Re: pgsql: autovacuum: handle analyze for partitioned tables |
Previous Message | Alvaro Herrera | 2021-04-08 15:19:37 | Re: pgsql: autovacuum: handle analyze for partitioned tables |