Re: Recovery target 'immediate'

From: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Recovery target 'immediate'
Date: 2013-05-03 11:02:08
Message-ID: 201305031302.13231.cedric@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le vendredi 3 mai 2013 02:54:15, Michael Paquier a écrit :
> On Fri, May 3, 2013 at 8:56 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > On Thu, May 2, 2013 at 09:31:03AM +0200, Magnus Hagander wrote:
> > > Actually, there is - I hear it quite often from people not so
> > > experienced in PostgreSQL. Though in fairness, I'm not entirely sure
> > > the new syntax would help - some of those need a tool to do it for
> > > them, really (and such tools exist, I believe).
> > >
> > > That said, there is one property that's very unclear now and that's
> > > that you can only set one of recovery_target_time, recovery_target_xid
> > > and recovery_target_name. But they can be freely combined with
> > > recovery_target_timeline and recovery_target_inclusive. That's quite
> > > confusing.
> > >
> > > > This changes the existing API which will confuse people that know it
> > > > and invalidate everything written in software and on wikis as to how
> > > > to do it. That means all the "in case of fire break glass"
> > > > instructions are all wrong and need to be rewritten and retested.
> > >
> > > Yes, *that* is the main reason *not* to make the change. It has a
> > > pretty bad cost in backwards compatibility loss. There is a gain, but
> > > I don't think it outweighs the cost.
> >
> > So, is there a way to add this feature without breaking the API?
>
> Yes, by adding a new parameter exclusively used to control this feature,
> something like recovery_target_immediate = 'on/off'.

We just need to add a named restore point when ending the backup (in
pg_stop_backup() ?).
No API change required. Just document that some predefined target names are set
during backup.
--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2013-05-03 12:41:31 Re: In progress INSERT wrecks plans on table
Previous Message Fabien COELHO 2013-05-03 06:05:28 Re: Documentation epub format