From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: Tom Lane <tgl@sss.pgh.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:26:57 -0400 (EDT)
Message-ID: <200604151726.k3FHQvI01801@candle.pha.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.64.0604150957290.9581@discord.dyndns.org>
Jeff Frost wrote:
> On Sat, 15 Apr 2006, Tom Lane wrote:
>
> > For a command-line solution it's probably sufficient to sort by mtime,
> > ie
> > ls -t | head -1
>
> A while back when I was trying to work this out on the admin list, I believe
> we came up with the following:
>
> ls -tp /pg_xlog/ | grep -v "backup\|/" | head -1
>
> which seems to work fairly well. Looks like that thread is here:
>
> http://archives.postgresql.org/pgsql-admin/2005-10/msg00173.php
What does the -p and \| pipe check do? We don't have named pipes in
that directory, do we?
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.
--
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, jeff@frostconsultingllc.com, tgl@sss.pgh.pa.us, dev@archonet.com
Subject: Re: Proposed doc-patch: Identifying the Current WAL file
In-Reply-To: <200604151726.k3FHQvI01801@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