Re: pg_basebackup and replication slots

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: 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-05-21 12:48:28
Message-ID: 555DD41C.1060506@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-05-21 14:11:16 Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Previous Message Robert Haas 2015-05-21 12:43:17 Re: Support for N synchronous standby servers - take 2