Re: Improve shutdown during online backup, take 4 - Mailing list pgsql-patches

From Albe Laurenz
Subject Re: Improve shutdown during online backup, take 4
Date
Msg-id D960CB61B694CF459DCFB4B0128514C2020A79D3@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Re: Improve shutdown during online backup, take 4  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Why?  That seems like an entirely arbitrary specification.

My resoning is that I think of smart/fast/immediate shutdown
as three different things.

For an immediate shutdown/crash thought it was best not to modify
anything to facilitate an analysis of the problem.

A fast shutdown that fails will end up as a crash or immediate
shutdown.


If you think that is is not important to only cancel backup mode
if we are sure that the shutdown will be clean, we might as well
also cancel online backup mode during an immediate shutdown.

In that case, I'd agree that the call to CancelBackup() could be moved
to WAIT_BACKUP (and executed only if it is no smart shutdown).
It would have the advantage of having all backup mode related
code in postmaster.c concentrated in one spot.


Make a suggestion, and I'll implement it that way.

Yours,
Laurenz Albe

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: 64-bit CommandIds
Next
From: Hans-Juergen Schoenig
Date:
Subject: Re: 64-bit CommandIds