Heikki Linnakangas wrote:
> On 10/06/10 17:38, Andrew Dunstan wrote:
>> I think my logic needs a tiny piece of adjustment, to ignore the
>> timeline segment of the file name.
> I'm not sure you should ignore it. Presumably anything in an older
> timeline is indeed not required anymore and can be removed, and
> anything in a newer timeline... how did it get there? Seems safer not
> remove it.
Well, I was just following the logic in pg-standby.c:
* We ignore the timeline part of the XLOG segment
* in deciding whether a segment is still needed. This
* ensures that we won't prematurely remove a segment from a
* parent timeline. We could probably be a little more
* proactive about removing segments of non-parent
* but that would be a whole lot more complicated.
* We use the alphanumeric sorting property of the filenames
* to decide which ones are earlier than the
* exclusiveCleanupFileName file. Note that this means files
* are not removed in the order they were originally
* in case this worries you.
if (strlen(xlde->d_name) == XLOG_DATA_FNAME_LEN &&
== XLOG_DATA_FNAME_LEN &&
strcmp(xlde->d_name + 8, exclusiveCleanupFileName + 8)
In response to
pgsql-hackers by date
|Next:||From: Heikki Linnakangas||Date: 2010-06-10 15:37:49|
|Subject: Re: fix use of posix_fadvise in xlog.c|
|Previous:||From: Andrew Dunstan||Date: 2010-06-10 15:26:59|
|Subject: Re: Error with GIT Repository|