From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Richard Huxton <dev(at)archonet(dot)com>, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: Proposed doc-patch: Identifying the Current WAL file |
Date: | 2006-04-14 16:07:15 |
Message-ID: | 9932.1145030835@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs pgsql-patches |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Richard Huxton wrote:
>> To identify the current, partially-filled WAL segment, sort first by
>> mtime and second by file name. That is, take the latest mtime among the
>> properly-named files, breaking ties by taking the higher filename.
> I am confused by this. Why do both mtime and file name need to be
> checked?
Because recycled WAL segments are renamed to have higher file names than
the currently-in-use segment. So you can't depend on file name first.
However, shortly after a segment switch two WAL segments could have the
same mtime (to within whatever the mtime granularity is, typ. 1 second).
The proposed rule should be OK as long as checkpoints (and ensuing
renames) can't occur oftener than the mtime granularity. If you're
checkpointing more than once a second, well, you need help ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-04-15 16:24:45 | Re: Proposed doc-patch: Identifying the Current WAL file |
Previous Message | Bruce Momjian | 2006-04-14 15:44:56 | Re: Proposed doc-patch: Identifying the Current WAL file |
From | Date | Subject | |
---|---|---|---|
Next Message | Nicolas Barbier | 2006-04-14 23:59:09 | Documentation patch: change a name in a grammar rule to prevent confusion |
Previous Message | Bruce Momjian | 2006-04-14 15:44:56 | Re: Proposed doc-patch: Identifying the Current WAL file |