Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id AE76E9FBBE7 for ; Thu, 26 Apr 2007 09:36:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 35863-01 for ; Thu, 26 Apr 2007 09:36:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by postgresql.org (Postfix) with ESMTP id B40E89FBB15 for ; Thu, 26 Apr 2007 09:36:26 -0300 (ADT) Received: from new-host.home ([71.166.59.121]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JH300D7NV0JFE24@vms044.mailsrvcs.net> for pgsql-admin@postgresql.org; Thu, 26 Apr 2007 07:36:20 -0500 (CDT) Date: Thu, 26 Apr 2007 08:36:11 -0400 From: Robert Treat Subject: Re: Finding time in WAL logs In-reply-to: <5B0132B1-646A-432C-8261-973E4BB42999@os.ca> To: pgsql-admin@postgresql.org Cc: Pascal Robert Message-id: <200704260836.11566.xzilla@users.sourceforge.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit Content-disposition: inline References: <5B0132B1-646A-432C-8261-973E4BB42999@os.ca> User-Agent: KMail/1.9.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/246 X-Sequence-Number: 25310 On Wednesday 25 April 2007 11:28, Pascal Robert wrote: > Hi, > > 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. > Look at the log_line_prefix option in the docs... http://www.postgresql.org/docs/8.2/interactive/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL