Re: pgsql: Move pg_stat_statements query jumbling to core.

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: pgsql: Move pg_stat_statements query jumbling to core.
Дата
Msg-id CAA4eK1+uUaghrL4GrugOCf2kiy_wc9ahPXZiMpa=uN8qZZprAw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Move pg_stat_statements query jumbling to core.  (Julien Rouhaud <rjuju123@gmail.com>)
Ответы Re: pgsql: Move pg_stat_statements query jumbling to core.  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-committers
On Thu, Apr 8, 2021 at 3:11 PM Julien Rouhaud <rjuju123@gmail.com> wrote:
>
> On Thu, Apr 08, 2021 at 02:52:26PM +0530, Amit Kapila wrote:
> >
> > Yeah, we do pass instrumentation flags from leader to worker but not
> > the one allocated via pg_stat_staments (pgss_ExecutorStart {...
> > queryDesc->totaltime ...}.
>
> Ah indeed, I now remember that problem that I had to deal with in some
> extensions [1].  For the record this was initially raised by Tomas in [2], but
> unfortunately that thread got forgotten and probably all third-party extensions
> ended up allocating some shmem for their need.
>
> > However, I guess prior to this patch those
> > were anyway not allocated separately because queryid was not passed to
> > workers. So, I think you are right it shouldn't change the previous
> > behavior.
>
> I think that previously parallel workers always added the required
> instrumentation if pg_stat_statements is loaded,
>

How? AFAICS, in pgss_ExecutorStart(), we allocate the instrumentation
structure only if queryid is non-zero which prior to this patch
shouldn't happen.


-- 
With Regards,
Amit Kapila.



В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Add ORDER BY to some regression test queries
Следующее
От: David Rowley
Дата:
Сообщение: pgsql: Cleanup partition pruning step generation