Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group