Re: [HACKERS] Resetting crash time of background worker

2015-04-02 Thread Robert Haas
On Sun, Mar 22, 2015 at 10:55 PM, Amit Khandekar wrote: > On 17 March 2015 at 19:12, Robert Haas wrote: >> On Tue, Mar 17, 2015 at 1:33 AM, Amit Khandekar >> wrote: >> > I think we either have to retain the knowledge that the worker has >> > crashed >> > using some new field, or else, we should

Re: [HACKERS] Resetting crash time of background worker

2015-03-22 Thread Amit Khandekar
On 17 March 2015 at 19:12, Robert Haas wrote: > On Tue, Mar 17, 2015 at 1:33 AM, Amit Khandekar > wrote: > > I think we either have to retain the knowledge that the worker has > crashed > > using some new field, or else, we should reset the crash time only if it > is > > not flagged BGW_NEVER_RE

Re: [HACKERS] Resetting crash time of background worker

2015-03-17 Thread Robert Haas
On Tue, Mar 17, 2015 at 1:33 AM, Amit Khandekar wrote: > When the postmaster recovers from a backend or worker crash, it resets bg > worker's crash time (rw->rw_crashed_at) so that the bgworker will > immediately restart (ResetBackgroundWorkerCrashTimes). > > But resetting rw->rw_crashed_at to 0 m

[HACKERS] Resetting crash time of background worker

2015-03-16 Thread Amit Khandekar
When the postmaster recovers from a backend or worker crash, it resets bg worker's crash time (rw->rw_crashed_at) so that the bgworker will immediately restart (ResetBackgroundWorkerCrashTimes). But resetting rw->rw_crashed_at to 0 means that we have lost the information that the bgworker had actu