From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jeff Frost <jeff@frostconsultingllc.com>
Cc: Richard Huxton <dev@archonet.com>
Cc: pgsql-docs@postgresql.org
Subject: Re: Proposed doc-patch: Identifying the Current WAL file
Date: Sat, 15 Apr 2006 14:09:06 -0400 (EDT)
Message-ID: <200604151809.k3FI96M06462@candle.pha.pa.us> (raw)
In-Reply-To: <20274.1145123863@sss.pgh.pa.us>
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Also, what happens if the log switch happens, and some data change is
> > written to the new WAL file in the first second, but nothing happens to
> > the database after that for a minute? Your test would still show the
> > old log file.
>
> You seem to be assuming that ls will sort on the basis of the truncated
> mtime that it displays, which is not the actual behavior of ls AFAIK.
No, I am not:
$ touch x1 x2; touch x2
$ sleep 2; ls -lt
total 0
-rw-r--r-- 1 root postgres 0 Apr 15 14:04 x1
-rw-r--r-- 1 root postgres 0 Apr 15 14:04 x2
If the write to x2 happens in the first second, but no later writes
happen, you still see x1 as first, even though x2 is the new one and
might have WAL data in it. The point is that the test does not have a
one-second window of showing the wrong answer, meaning I could wait for
60 seconds, and still see the wrong WAL file at the top.
--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, jeff@frostconsultingllc.com, dev@archonet.com
Subject: Re: Proposed doc-patch: Identifying the Current WAL file
In-Reply-To: <200604151809.k3FI96M06462@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox