No AVworkers when PM_RECOVERY_CONSISTENT

Lists: pgsql-hackers
From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: No AVworkers when PM_RECOVERY_CONSISTENT
Date: 2009-09-05 08:13:02
Message-ID: 1252138382.2889.694.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


When pmState == PM_RECOVERY_CONSISTENT we run
SignalAutovacWorkers(SIGTERM);
at normal shutdown

This currently does nothing, but since there aren't ever going to be any
AVworkers at this time we should be explicitly skipping this. That
should avoid misunderstanding the code and avoid any future side
effects.

Low priority, minor.

Removed while updating earlier work on HS.

--
Simon Riggs www.2ndQuadrant.com

Attachment Content-Type Size
shutdown_av_only_in_PM_RUN.v1.patch text/x-patch 990 bytes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: No AVworkers when PM_RECOVERY_CONSISTENT
Date: 2009-09-05 15:06:56
Message-ID: 3500.1252163216@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> When pmState == PM_RECOVERY_CONSISTENT we run
> SignalAutovacWorkers(SIGTERM);
> at normal shutdown

> This currently does nothing, but since there aren't ever going to be any
> AVworkers at this time we should be explicitly skipping this. That
> should avoid misunderstanding the code and avoid any future side
> effects.

The code is trying to signal every child that exists. By that logic we
should have a lot more conditionals to try to avoid signaling process
that "shouldn't" exist in the current PM state --- eg, the following
line where the AV launcher is signaled. I don't think it's going to
be an improvement in either readability or robustness.

regards, tom lane