X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id BCFF711F6B6A for ; Sat, 15 Apr 2006 13:40:22 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.003 X-Spam-Level: X-Spam-Status: No, score=-2.003 required=5 tests=[AWL=0.598, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id yaG4H6inp+rC for ; Sat, 15 Apr 2006 13:40:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 3B27711F68CD for ; Sat, 15 Apr 2006 13:40:15 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3FGeBeT018674; Sat, 15 Apr 2006 12:40:11 -0400 (EDT) To: Bruce Momjian cc: Richard Huxton , pgsql-docs@postgresql.org Subject: Re: Proposed doc-patch: Identifying the Current WAL file In-reply-to: <200604151624.k3FGOj525540@candle.pha.pa.us> References: <200604151624.k3FGOj525540@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Sat, 15 Apr 2006 12:24:45 -0400" Date: Sat, 15 Apr 2006 12:40:11 -0400 Message-ID: <18673.1145119211@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/9 X-Sequence-Number: 3508 Bruce Momjian writes: > In the first case, x2 is current, having be just switched to from x1, > while in the second case, x1 is current. In BSD, you can use ls -ltT to > see the seconds, but in Linux it is something different, and I am sure > there are some operating systems that don't allow you to see the seconds > at all. What general command-line solution can we propose for this > process? For a command-line solution it's probably sufficient to sort by mtime, ie ls -t | head -1 You'll be at worst 1 second behind reality, assuming 1-second granularity of mtime (and assuming ls sorts by the real mtime not what it shows you, but that's true everywhere AFAIK). regards, tom lane