Re: BUG #7643: Issuing a shutdown request while server startup leads to server hang

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hari Babu <haribabu(dot)kommi(at)huawei(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7643: Issuing a shutdown request while server startup leads to server hang
Date: 2012-11-21 15:59:18
Message-ID: 4660.1353513558@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hari Babu <haribabu(dot)kommi(at)huawei(dot)com> writes:
> I have a query regarding the changing of pmState only incase of SIGTERM but
> not incase of SIGINT.
> Is there any reason to handle like this? or Is it ok to modify the handling
> of pmState in SIGTERM same as SIGINT?

AFAICT the "smart shutdown" code path is okay: it transitions to
PM_WAIT_READONLY state, and then PostmasterStateMachine issues SIGTERM
to the startup process and goes to PM_WAIT_BACKENDS state. Perhaps this
could be done more clearly but I'm disinclined to mess with it.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Greg Sabino Mullane 2012-11-21 20:29:44 Re: Prepared Statement Name Truncation
Previous Message Hari Babu 2012-11-21 13:32:03 Re: BUG #7643: Issuing a shutdown request while server startup leads to server hang