|From:||Peter Eisentraut <peter_e(at)gmx(dot)net>|
|Subject:||Re: pg_basebackup and replication slots|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On 5/21/15 8:42 AM, 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
Here is a patch set for this.
(If you're looking at the patch and wondering why there is no code to
actually do anything with the replication slot, that's because the code
that does the WAL streaming is already aware of replication slots
because of the pg_receivexlog functionality that it also serves. So all
that needs to be done is set replication_slot.)
See also the concurrent discussion on (optionally?) initializing
restart_lsn when the replication slot is created
which might have an impact on the details of this change.
|Next Message||Fujii Masao||2015-07-01 01:58:12||Re: Memory leak with XLogFileCopy since de768844 (WAL file with .partial)|
|Previous Message||Peter Geoghegan||2015-07-01 00:36:31||Re: Bug in bttext_abbrev_convert()|