Re: Corner case in xlog stuff: what happens exactly at a seg boundary?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Corner case in xlog stuff: what happens exactly at a seg boundary?
Date: 2006-08-06 03:59:40
Message-ID: 18482.1154836780@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2006-08-06 07:05:10 Re: 8.2 features status
Previous Message Tom Lane 2006-08-06 03:57:18 Re: Forcing current WAL file to be archived