signal and startup process
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-10-14T03:57:52Z
Lists: pgsql-hackers
Attachments
- signal_handler_wakeup_recovery_v1.patch (application/octet-stream) patch v1
Hi, It takes nonsensically extra several seconds to shut down the standby server. This is because the startup process cannot respond immediately the SIGTERM signal sent by postmaster for the shutdown while it's sleeping on WaitLatch. This delays the shutdown for up to the sleep time on WaitLatch (currently 5 seconds). The signal handlers of the startup process should call SetLatch to respond the signals even while it's sleeping on WaitLatch, like those of walsender already do. The attached patch does this. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center