Re: pgsql: Add hooks for session start and session end, take two - Mailing list pgsql-committers

From Michael Paquier
Subject Re: pgsql: Add hooks for session start and session end, take two
Date
Msg-id 20191001052245.GH2781@paquier.xyz
Whole thread Raw
In response to Re: pgsql: Add hooks for session start and session end, take two  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pgsql: Add hooks for session start and session end, take two  (Michael Paquier <michael@paquier.xyz>)
List pgsql-committers
On Tue, Oct 01, 2019 at 01:52:46PM +0900, Michael Paquier wrote:
> This indicates that it is possible to reach GetCurrentCommandId() for
> a parallel worker in this context.  It is possible to get rid of the
> problem by enforcing the following in the tests so as we have no
> parallel plans:
> SET max_parallel_workers = 0;
> SET max_parallel_workers_per_gather = 0;
> Or just use SetConfigOption as per the attached which would be a bit
> cleaner, and both could be used as a temporary solution to cool down
> the buildfarm but that does not feel completely right to me in the
> long term.
>
> Any thoughts?

Actually, it makes little sense to allow parallel workers to log their
activity in the module.  So if there are no objections, I would like
to fix that by checking after IsParallelWorker() in the hooks of the
module.
--
Michael

Attachment

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Add hooks for session start and session end, take two
Next
From: Michael Paquier
Date:
Subject: Re: pgsql: Add hooks for session start and session end, take two