From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | vignesh C <vignesh21(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: Parallel worker hangs while handling errors. |
Date: | 2020-07-28 09:34:51 |
Message-ID: | CALj2ACWB9P6ocrzTQDTB7wT3gdtc1m7fntnPpBbNb3ZjOGiMrQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jul 28, 2020 at 11:05 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> Thanks for your comments Bharath.
>
> On Mon, Jul 27, 2020 at 10:13 AM Bharath Rupireddy
> <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> > 1. Do we need "worker" as a function argument in
> > update_parallel_worker_sigmask(BackgroundWorker *worker,.... ? Since
> > MyBgworkerEntry is a global variable, can't we have a local variable
> > instead?
>
> Fixed, I have moved the worker check to the caller function.
>
> > 2. Instead of update_parallel_worker_sigmask() serving only for
> > parallel workers, can we make it generic, so that for any bgworker,
> > given a signal it unblocks it, although there's no current use case
> > for a bg worker unblocking a single signal other than a parallel
> > worker doing it for SIGUSR1 for this hang issue. Please note that we
> > have BackgroundWorkerBlockSignals() and
> > BackgroundWorkerUnblockSignals().
>
> Fixed. I have slightly modified the changes to break into
> BackgroundWorkerRemoveBlockSignal & BackgroundWorkerAddBlockSignal.
> This maintains the consistency similar to
> BackgroundWorkerBlockSignals() and BackgroundWorkerUnblockSignals().
>
> > If okay, with the BackgroundWorkerUpdateSignalMask() function, please
> > note that we might have to add it in bgworker.sgml as well.
>
> Included the documentation.
>
> Attached the updated patch for the same.
>
The v4 patch looks good to me. Hang is not seen, make check and make
check-world passes. I moved this to the committer for further review
in https://commitfest.postgresql.org/29/2636/.
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Dagfinn Ilmari Mannsåker | 2020-07-28 11:21:29 | Doc patch: mention indexes in pg_inherits docs |
Previous Message | Julien Rouhaud | 2020-07-28 08:55:04 | Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view? |