X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6AE2FD1B173 for ; Tue, 6 Jul 2004 16:01:03 -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 12978-07 for ; Tue, 6 Jul 2004 19:00:56 +0000 (GMT) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by svr1.postgresql.org (Postfix) with ESMTP id 42371D1B172 for ; Tue, 6 Jul 2004 16:00:53 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 1BhvBV-0004fJ-0U; Tue, 06 Jul 2004 20:00:53 +0100 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 3A38517182; Tue, 6 Jul 2004 20:00:52 +0100 (BST) Message-ID: <40EAF6E3.9090508@archonet.com> Date: Tue, 06 Jul 2004 20:00:51 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Simon Riggs Cc: Tom Lane , pgsql-hackers@postgresql.org Subject: Re: Point in Time Recovery References: <1089060299.17493.58.camel@stromboli> <4263.1089064016@sss.pgh.pa.us> <1089069104.17493.132.camel@stromboli> In-Reply-To: <1089069104.17493.132.camel@stromboli> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/325 X-Sequence-Number: 55886 Simon Riggs wrote: > On Mon, 2004-07-05 at 22:46, Tom Lane wrote: > >>Simon Riggs writes: >> >>>Should we use a different datatype than time_t for the commit timestamp, >>>one that offers more fine grained differentiation between checkpoints? >> >>Pretty much everybody supports gettimeofday() (time_t and separate >>integer microseconds); you might as well use that. Note that the actual >>resolution is not necessarily microseconds, and it'd still not be >>certain that successive commits have distinct timestamps --- so maybe >>this refinement would be pointless. You'll still have to design a user >>interface that allows selection without the assumption of distinct >>timestamps. > > > Well, I agree, though without the desired-for UI now, I think some finer > grained mechanism would be good. This means extending the xlog commit > record by a couple of bytes...OK, lets live a little. At the risk of irritating people, I'll repeat what I suggested a few weeks ago... Add a table: pg_pitr_checkpt (pitr_id SERIAL, pitr_ts timestamptz, pitr_comment text) Let the user insert rows in transactions as desired. Let them stop the restore when a specific (pitr_ts,pitr_comment) gets inserted (or on pitr_id if they record it). IMHO time is seldom relevant, event boundaries are. If you want to add special syntax for this, fine. If not, an INSERT statement is a convenient way to do this anyway. -- Richard Huxton Archonet Ltd