On Sat, Aug 05, 2006 at 11:59:40PM -0400, Tom Lane wrote:
> I wrote:
> > Rather than expecting user-level scripts to get this corner case
> > right, I suggest that we ought to modify pg_stop_backup and friends
> > so that what they return is the last used byte address of WAL, not
> > the first unused byte address as now.  Then, blindly extracting
> > the filename will give the right answer about which file to archive,
> > even in the boundary case.
> After further thought I desisted from that plan: changing the result
> convention of existing functions like pg_stop_backup() will break any
> existing archiving scripts that do get it right.  Instead, we can put
> the boundary-case logic into the new functions that extract a filename
> from the WAL location string that the action functions return.

Should we ask users if anyone is currently doing this? It seems pretty
ugly to have most functions return the last used WAL byte with only
stop_backup returning the first unused byte. If nothing else we should
at least plan on depricating this, probably by having a
pg_stop_backup(boolean) that lets the user specify which behavior they
want, and eventually switching pg_stop_backup() to the new behavior.

Ultimately, I'd bet that the vast majority of scripts out there blindly
do the wrong thing today and the authors aren't even aware of the issue.
Jim C. Nasby, Sr. Engineering Consultant      [EMAIL PROTECTED]
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to