From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
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 13:56:32 -0400
Message-ID: <20245.1145123792@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.64.0604151029490.9581@discord.dyndns.org>
References: <200604151726.k3FHQvI01801@candle.pha.pa.us>
<Pine.LNX.4.64.0604151029490.9581@discord.dyndns.org>
Jeff Frost <jeff@frostconsultingllc.com> writes:
>>> ls -tp /pg_xlog/ | grep -v "backup\|/" | head -1
>>
>> What does the -p and \| pipe check do? We don't have named pipes in
>> that directory, do we?
> The -p shows forward slashes after directories and the \| acts as an or and
> the / following that just lets us filter directories out.
This seems both overly cute and wrong, because it fails to filter plain
files that might have a new mtime but aren't WAL files. I'd suggest a
simple test on file name to make sure it looks like a WAL file, ie,
24 hex digits.
ls -t .../pg_xlog | grep '^[0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]$' | head -1
regards, tom lane
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: tgl@sss.pgh.pa.us, jeff@frostconsultingllc.com, pgman@candle.pha.pa.us, dev@archonet.com
Subject: Re: Proposed doc-patch: Identifying the Current WAL file
In-Reply-To: <20245.1145123792@sss.pgh.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