| From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> | 
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> | 
| Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: pg_basebackup and replication slots | 
| Date: | 2015-07-29 11:47:01 | 
| Message-ID: | CANP8+j+85Hyn7hi0G+6bJTC77PfdW+mEHWbk2ik4=GoaDP_MEg@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On 29 July 2015 at 11:43, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2015-07-29 09:17:04 +0100, Simon Riggs wrote:
> > On 29 July 2015 at 09:09, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > > The point of using a temporary slot is to not have a
> > > leftover slot afterwards, reserving resources. Especially important if
> > > the basebackup actually failed...
> > >
> >
> > Creating a slot and then deleting it if the session disconnects does not
> > successfully provide the functionality desired above.
>
> Uh? If you create the slot, start streaming, and then start the
> basebackup, it does. It does *not* guarantee that the base backup can be
> converted into a replica, but it's sufficient to guarantee it can
> brought out of recovery.
>
Perhaps we are misunderstanding the word "it" here. "it can be brought out
of recovery"?
You appear to be saying that a backup that disconnects before completion is
useful in some way. How so?
If the slot is cleaned up on disconnect, as suggested, then you end up with
half a backup and WAL is cleaned up. The only possible use for slots is to
reserve resources (as you say); the resources will clearly not be reserved
if we drop the slot on disconnect. What use is that?
-- 
Simon Riggs                http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Riggs | 2015-07-29 11:50:25 | Re: MultiXact member wraparound protections are now enabled | 
| Previous Message | Andres Freund | 2015-07-29 11:39:49 | Re: LWLock deadlock and gdb advice |