Re: pgsql: Add hooks for session start and session end, take two

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Add hooks for session start and session end, take two
Date: 2019-10-01 05:22:45
Message-ID: 20191001052245.GH2781@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-10-01 05:25:43 Re: pgsql: Add hooks for session start and session end, take two
Previous Message Tom Lane 2019-10-01 05:10:36 Re: pgsql: Add hooks for session start and session end, take two