BUG #7643: Issuing a shutdown request while server startup leads to server hang - Mailing list pgsql-bugs

From haribabu.kommi@huawei.com
Subject BUG #7643: Issuing a shutdown request while server startup leads to server hang
Date
Msg-id E1TWWd4-0008AD-9E@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #7643: Issuing a shutdown request while server startup leads to server hang  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      7643
Logged by:          Haribabu
Email address:      haribabu.kommi@huawei.com
PostgreSQL version: 9.2.1
Operating system:   Suse Linux 10.2
Description:        =


Problem Reproduction:
1. Add recovery.conf to the database directory.
2. Start the server
3. Issue the shutdown request =

and the shutdown request timing should be such that below server logs should
print.

Log:

./postgres -D data -p 3335
LOG:  database system was shut down in recovery at 2012-11-08 19:42:42 IST
LOG:  entering standby mode
LOG:  received fast shutdown request
LOG:  consistent recovery state reached at 0/17D0700
LOG:  record with zero length at 0/17D0700

Problem reproduced in 9.3 head.

I think the following things are leading to the problem:

1. The postmaster is queued up with the following signals in the order of
SIGINT (shutdown) and SIGUSR1 (Here we create bgwriter and checkpoint) and
the current state of postmaster is PM_STARTUP.

we are creating the bgwriter and checkpoint after processing the shutdown
request, because of this reason no one is there is to send the SIGTERM to
bgwriter and checkpoint.

pgsql-bugs by date:

Previous
From: Sergey
Date:
Subject: Re: BUG #7641: ERROR: must specify relation and object name when function contains DROP TRIGGER
Next
From: daniel@heroku.com
Date:
Subject: BUG #7648: Momentary index corruption while in hot standby