Re: Proposed doc-patch: Identifying the Current WAL file

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-15 17:26:57
Message-ID: 200604151726.k3FHQvI01801@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-patches

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. +

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Jeff Frost 2006-04-15 17:47:12 Re: Proposed doc-patch: Identifying the Current WAL file
Previous Message Jeff Frost 2006-04-15 17:00:35 Re: Proposed doc-patch: Identifying the Current WAL file

Browse pgsql-patches by date

  From Date Subject
Next Message Jeff Frost 2006-04-15 17:47:12 Re: Proposed doc-patch: Identifying the Current WAL file
Previous Message Jeff Frost 2006-04-15 17:00:35 Re: Proposed doc-patch: Identifying the Current WAL file