Re: pg_basebackup and replication slots - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: pg_basebackup and replication slots
Date
Msg-id CANP8+jKoEjHRHWAOwr6oiUhXv2zP1DqAQOW1P_kq+sJC8veiCA@mail.gmail.com
Whole thread Raw
In response to Re: pg_basebackup and replication slots  (Andres Freund <andres@anarazel.de>)
Responses Re: pg_basebackup and replication slots
List pgsql-hackers
On 29 July 2015 at 13:00, Andres Freund <andres@anarazel.de> wrote:
 
As far as I understand this subthread the goal is to have a
pg_basebackup that internally creates a slot, so it can guarantee that
all the required WAL is present till streamed out by -X
stream/fetch. The problem with just creating a slot is that it'd "leak"
if pg_basebackup is killed, or the connection breaks.  The idea with the
ephemeral slot is that it'd automatically kept alive until the base
backup is complete, but would also automatically be dropped if the base
backup fails.

Makes sense?

So this would be needed when creating a standalone backup that would not be persistently connected to the master, yet we want to bring it up as a live/writable server in a single command, and we want to make it easy to script in case our script is killed?

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Freeze avoidance of very large table.
Next
From: Simon Riggs
Date:
Subject: Re: Don'st start streaming after creating a slot in pg_receivexlog