Re: Proposed doc-patch: Identifying the Current WAL file - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: Proposed doc-patch: Identifying the Current WAL file
Date
Msg-id 200604151726.k3FHQvI01801@candle.pha.pa.us
Whole thread Raw
In response to Re: Proposed doc-patch: Identifying the Current WAL file  (Jeff Frost <jeff@frostconsultingllc.com>)
Responses Re: Proposed doc-patch: Identifying the Current WAL file  (Jeff Frost <jeff@frostconsultingllc.com>)
Re: Proposed doc-patch: Identifying the Current WAL file  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
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. +

pgsql-docs by date:

Previous
From: Jeff Frost
Date:
Subject: Re: Proposed doc-patch: Identifying the Current WAL file
Next
From: Jeff Frost
Date:
Subject: Re: Proposed doc-patch: Identifying the Current WAL file