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

From Heikki Linnakangas
Subject Re: pg_basebackup and replication slots
Date
Msg-id 555DD41C.1060506@iki.fi
Whole thread Raw
In response to pg_basebackup and replication slots  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On 05/21/2015 03:42 PM, Peter Eisentraut wrote:
> I wonder why pg_basebackup doesn't have any support for replication slots.
>
> When relying on replication slots to hang on to WAL data, there is a gap
> between when pg_basebackup finishes and streaming replication is started
> where WAL data could be thrown away by the primary.
>
> Looking at the code, the -X stream method could easily specify a
> replication slot.  (Might be nice if it could also create it in the same
> run.)

Yeah, would be nice. The automatically-created slot should also be 
automatically removed if the backup is aborted for any reason, i.e. if 
the connection dies.

- Heikki




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Support for N synchronous standby servers - take 2
Next
From: Robert Haas
Date:
Subject: Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)