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 52F2DD1B179 for ; Thu, 22 Jul 2004 04:43:58 -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 78833-09 for ; Thu, 22 Jul 2004 07:43:55 +0000 (GMT) Received: from cmailm3.svr.pol.co.uk (cmailm3.svr.pol.co.uk [195.92.193.19]) by svr1.postgresql.org (Postfix) with ESMTP id 703E8D1B3A8 for ; Thu, 22 Jul 2004 04:43:48 -0300 (ADT) Received: from modem-2258.lion.dialup.pol.co.uk ([217.135.168.210] helo=[192.168.0.102]) by cmailm3.svr.pol.co.uk with esmtp (Exim 4.14) id 1BnYEs-0006ac-R1; Thu, 22 Jul 2004 08:43:39 +0100 Subject: Re: [HACKERS] Point in Time Recovery From: Simon Riggs To: Tom Lane Cc: Bruce Momjian , Mark Kirkwood , pgsql-admin@postgresql.org In-Reply-To: <2534.1090466948@sss.pgh.pa.us> References: <200407220306.i6M36MU11209@candle.pha.pa.us> <2534.1090466948@sss.pgh.pa.us> Content-Type: text/plain Organization: 2nd Quadrant Message-Id: <1090482198.2660.4.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 22 Jul 2004 08:43:18 +0100 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/247 X-Sequence-Number: 14315 On Thu, 2004-07-22 at 04:29, Tom Lane wrote: > Bruce Momjian writes: > > I think we should push the partially complete WAL file to the archive > > location before shutdown. ... > > When you are running and finally fill up the WAL file it would then > > overwrite the one in the archive but I think that is OK. > > I don't think this can fly at all. Here are some off-the-top-of-the-head > objections: > > 1. We don't have the luxury of spending indefinite amounts of time to > do a database shutdown. Commonly we are under a twenty-second sentence > of death from init. I don't want to spend the 20 seconds waiting to see > if the archiver will manage to push 16MB onto a slow tape drive. Also, > if the archiver does fail to push the data in time, it'll likely leave a > broken (partial) xlog file in the archive, which would be really bad > news if the user then relies on that. > > 2. What if the archiver process entirely fails to push the file? (Maybe > there's not enough disk space, for instance.) In normal operation we'll > just retry every so often. We definitely can't do that during shutdown. > > 3. You're blithely assuming that the archival process can easily provide > overwrite semantics for multiple pushes of the same xlog filename. Stop > thinking about "cp to some directory" and start thinking "dump to tape" > or "burn onto CD" or something like that. We'll be raising the ante > considerably if we require the archive_command to deal with this. > > I think the last one is really the most significant issue. We have to > keep the archiver API as simple as possible. > Not read whole chain of conversation...but this idea came up before and was rejected then. I agree with the 3 objections to that thought above. There's already enough copies of full xlogs around to worry about. If you need more granularity, reduce size of xlog files.... (Tom, SUID would be the correct timeline id in that situation? ) More later, Simon Riggs