Re: For what should pg_stop_backup wait? - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: For what should pg_stop_backup wait?
Date
Msg-id 1220890591.3913.190.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: For what should pg_stop_backup wait?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: For what should pg_stop_backup wait?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2008-09-08 at 11:57 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> >> So thinking we should test XLogArchiveCheckDone() for both
> >> stopxlogfilename and history file and then stat for the stop WAL file:
> 
> > This seems better.
> 
> Somehow I missed the 5-Apr patch that introduced this bogosity.
> Next time you make a fundamental change in the behavior of a function,
> how about updating its comment to match?

It felt OK when I did it, because of the clearly named boolean. But I
accept your point and will look to improve my code comments in future.

> After studying it for a minute, I think that XLogArchiveCheckDone no
> longer even has a clearly explainable purpose; it needs to be split
> into two functions with two different behaviors.  I plan to revert
> XLogArchiveCheckDone to its previous behavior and introduce
> XLogArchiveIsBusy (flipping the sense of the result) to use in
> pg_stop_backup.

You sound like you're in the middle of doing this yourself. Or would you
like me to do that?

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Fast REVERSE() function?
Next
From: "Pavel Stehule"
Date:
Subject: Re: Fast REVERSE() function?