Re: A couple of fishy-looking critical sections - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A couple of fishy-looking critical sections
Date
Msg-id 9325.979945256@sss.pgh.pa.us
Whole thread Raw
In response to RE: A couple of fishy-looking critical sections  ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>)
List pgsql-hackers
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:
>> 3. src/backend/access/transam/xlog.c, routine CreateCheckPoint:
>> does this *entire* routine need to be a critical section?  Again,
>> I fear a shotgun approach will mean a net decrease in reliability,
>> not an improvement.  How much of this code really has to be critical?

> When postmaster has to create Checkpoint this routine is called from
> bootstrap.c:BootstrapMain() - ie without normal initialization, so
> I don't know result of elog(ERROR) in this case -:(

I believe elog(ERROR) will be treated like FATAL in this case (because
Warn_restart isn't set).  So the checkpoint process will clean up and
exit, but there wouldn't be a system-wide restart were it not for the
critical section.

The question that's bothering me is whether a system-wide restart is
actually going to make things better, rather than worse, if the
checkpoint process has a problem ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Mikheev, Vadim"
Date:
Subject: RE: A couple of fishy-looking critical sections
Next
From: Tom Lane
Date:
Subject: Re: Bit strings