Re: [HACKERS] Unintended restart after recovery error

2014-11-17 Thread Robert Haas
On Thu, Nov 13, 2014 at 10:59 PM, Fujii Masao wrote: > 442231d7f71764b8c628044e7ce2225f9aa43b6 introduced the latter rule > for hot-standby case. Maybe *during crash recovery* (i.e., hot standby > should not be enabled) it's better to treat the crash of startup process as > a catastrophic crash.

Re: [HACKERS] Unintended restart after recovery error

2014-11-14 Thread Antonin Houska
Fujii Masao wrote: > On Thu, Nov 13, 2014 at 8:30 AM, Robert Haas wrote: >> It's true that if the startup process dies we don't try to restart, >> but it's also true that if the checkpointer dies we do try to restart. >> I'm not sure why this specific situation should be an exception to >> that g

Re: [HACKERS] Unintended restart after recovery error

2014-11-13 Thread Fujii Masao
On Thu, Nov 13, 2014 at 8:30 AM, Robert Haas wrote: > On Wed, Nov 12, 2014 at 4:52 PM, Antonin Houska wrote: >> Fujii Masao wrote: >> >>> On Wed, Nov 12, 2014 at 6:52 PM, Antonin Houska wrote: >>> > While looking at postmaster.c:reaper(), one problematic case occurred to >>> > me. >>> > >>> >

Re: [HACKERS] Unintended restart after recovery error

2014-11-12 Thread Robert Haas
On Wed, Nov 12, 2014 at 4:52 PM, Antonin Houska wrote: > Fujii Masao wrote: > >> On Wed, Nov 12, 2014 at 6:52 PM, Antonin Houska wrote: >> > While looking at postmaster.c:reaper(), one problematic case occurred to >> > me. >> > >> > >> > 1. Startup process signals PMSIGNAL_RECOVERY_STARTED. >>

Re: [HACKERS] Unintended restart after recovery error

2014-11-12 Thread Antonin Houska
Fujii Masao wrote: > On Wed, Nov 12, 2014 at 6:52 PM, Antonin Houska wrote: > > While looking at postmaster.c:reaper(), one problematic case occurred to me. > > > > > > 1. Startup process signals PMSIGNAL_RECOVERY_STARTED. > > > > 2. Checkpointer process is forked and immediately dies. > > > > 3

Re: [HACKERS] Unintended restart after recovery error

2014-11-12 Thread Fujii Masao
On Wed, Nov 12, 2014 at 6:52 PM, Antonin Houska wrote: > While looking at postmaster.c:reaper(), one problematic case occurred to me. > > > 1. Startup process signals PMSIGNAL_RECOVERY_STARTED. > > 2. Checkpointer process is forked and immediately dies. > > 3. reaper() catches this failure, calls

Re: [HACKERS] Unintended restart after recovery error

2014-11-12 Thread Antonin Houska
Antonin Houska wrote: > While looking at postmaster.c:reaper(), one problematic case occurred to me. > > > 1. Startup process signals PMSIGNAL_RECOVERY_STARTED. > > 2. Checkpointer process is forked and immediately dies. > > 3. reaper() catches this failure, calls HandleChildCrash() and thus

[HACKERS] Unintended restart after recovery error

2014-11-12 Thread Antonin Houska
While looking at postmaster.c:reaper(), one problematic case occurred to me. 1. Startup process signals PMSIGNAL_RECOVERY_STARTED. 2. Checkpointer process is forked and immediately dies. 3. reaper() catches this failure, calls HandleChildCrash() and thus sets FatalError to true. 4. Startup pro