X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2859A53580 for ; Mon, 18 Apr 2005 14:06:15 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92873-07 for ; Mon, 18 Apr 2005 17:06:07 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id BD5F253313 for ; Mon, 18 Apr 2005 14:06:06 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j3IH65m27532; Mon, 18 Apr 2005 13:06:05 -0400 (EDT) From: Bruce Momjian Message-Id: <200504181706.j3IH65m27532@candle.pha.pa.us> Subject: Re: question about wal and point in time recovery In-Reply-To: <3098.1113366527@sss.pgh.pa.us> To: Tom Lane Date: Mon, 18 Apr 2005 13:06:05 -0400 (EDT) Cc: Alex Zendel , pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/230 X-Sequence-Number: 17243 Tom Lane wrote: > > can the log be modified before recovery occurs. > > Not easily. If you were to hack any one log entry, you'd have to > recompute the CRC checksum for it, and there's no way at all to make > a change that would involve changing the size of a log entry. So > really the only useful option you have here is to stop recovery short > of a particular log entry you don't like. > > > my biggest concern is that somebody in my org, for example, deletes a > > field or fudges an update query that changes a foreign key to a single > > value - and therefore destroys table links. so what if this happens > > and nobody notices it for several weeks? > > There is no automatic recovery mechanism that is going to help you in > such a scenario. You can't expect to undo a long-ago change and not > have that break some unknown number of consequent decisions. I think it might be easier to somehow hack the binary that reads the WAL file on recovery to adjust how it handles a certain WAL entry, rather than modifying the WAL files itself. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073