Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 6029F9FBE44 for ; Wed, 25 Apr 2007 14:13:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 38891-09 for ; Wed, 25 Apr 2007 14:13:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from osci.qc.ca (cgp.osci.qc.ca [216.113.25.150]) by postgresql.org (Postfix) with ESMTP id CEB899FA4C1 for ; Wed, 25 Apr 2007 14:13:45 -0300 (ADT) Received: from [192.168.3.143] (account probert [192.168.3.143] verified) by osci.qc.ca (CommuniGate Pro SMTP 5.0.13) with ESMTPA id 9052236; Wed, 25 Apr 2007 13:13:44 -0400 In-Reply-To: <1177515789.20637.160.camel@silverbirch.site> References: <5B0132B1-646A-432C-8261-973E4BB42999@os.ca> <1177515789.20637.160.camel@silverbirch.site> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <7697F772-07E3-469C-8E51-1450AEBC5F39@os.ca> Cc: Content-Transfer-Encoding: quoted-printable From: Pascal Robert Subject: Re: Finding time in WAL logs Date: Wed, 25 Apr 2007 13:13:20 -0400 To: Simon Riggs X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/234 X-Sequence-Number: 25298 Le 07-04-25 =E0 11:43, Simon Riggs a =E9crit : > On Wed, 2007-04-25 at 11:28 -0400, Pascal Robert wrote: > >> I'm writing our backup procedure for using WAL and PITR, but to be >> able to do a (mostly) perfect PITR, I need to find the time when a >> error (DELETE FROM, DROP TABLE, etc.) was made so that I can do a >> restore just before the error. >> >> Does PostgreSQL has something similar to "mysqlbinlog" so that I can >> look at the content of a WAL archive ? I tried enabling >> "log_min_messages" at "info" level, but it doesn't log the date and >> time of a executed statement, so that's not a solution. > > http://pgfoundry.org/projects/xlogviewer/ > > I'd appreciate some feedback. I'll be looking to release a new version > within next few months. When I look at a log with xlogdump -s /tmp/NAMEOFWAL, I always get =20 this at the end : Unable to read continuation page? BTW, the statements look like this : 0/15FFE470: prv 0/15FFE440; xid 2332; HEAP info 10 len 18 = tot_len 46 DELETE FROM 16612 WHERE ...delete: ts 1663 db 16384 rel 16612 = block =20 1413 off 5 (this is for a DELETE FROM table without any WHERE clause). I see =20 the XID, but can you also display date and time in the ouput ?=