Re: PITR backup history files with identical 2nd part file names - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PITR backup history files with identical 2nd part file names
Date
Msg-id 14739.1264111568@sss.pgh.pa.us
Whole thread Raw
In response to Re: PITR backup history files with identical 2nd part file names  (Rafael Martinez <r.m.guerrero@usit.uio.no>)
List pgsql-hackers
Rafael Martinez <r.m.guerrero@usit.uio.no> writes:
> Tom Lane wrote:
>> I think this is normal behavior now, if you have an unloaded server.
>> pg_start_backup now forces a segment switch, so if nothing much else is
>> happening it's quite likely that the recorded start point will be the
>> beginning of the WAL segment (plus the page header size).

> The strange thing is that a lot is happening. These clusters generate
> several hundred WAL files a day.

Well, by "loaded server" I meant "something sufficient busy to generate
another WAL record in the extremely narrow time window between when
pg_start_backup advances the WAL pointer and when it copies the WAL
pointer".  It might even be that those two things happen within a single
acquisition of WALInsertLock and thus there isn't any window at all ---
I didn't dig into the code closely enough to be sure about that.

> I trust what you say on the subject :-) .... is only that in all the
> years we have been using PITR, we have never seen identical values in
> the 2nd part of the backup history file name (not one)

Well, it was a pretty recent change that made pg_start_backup force
a segment switch.  Before that you'd have seen values ranging throughout
the size of a WAL segment.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Rafael Martinez
Date:
Subject: Re: PITR backup history files with identical 2nd part file names
Next
From: Robert Haas
Date:
Subject: Re: primary key error message