Re: pgsql: Introduce replication slots. - Mailing list pgsql-committers

From Fujii Masao
Subject Re: pgsql: Introduce replication slots.
Date
Msg-id CAHGQGwGvb0qXP7Q76xLUkGO+wE9SyJzvzF=QBOS-mxgiz0vfKw@mail.gmail.com
Whole thread Raw
In response to pgsql: Introduce replication slots.  (Robert Haas <rhaas@postgresql.org>)
Responses Re: pgsql: Introduce replication slots.  (Andres Freund <andres@2ndquadrant.com>)
Re: pgsql: Introduce replication slots.  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-committers
On Sat, Feb 1, 2014 at 12:50 PM, Robert Haas <rhaas@postgresql.org> wrote:
> Introduce replication slots.
>
> Replication slots are a crash-safe data structure which can be created
> on either a master or a standby to prevent premature removal of
> write-ahead log segments needed by a standby, as well as (with
> hot_standby_feedback=on) pruning of tuples whose removal would cause
> replication conflicts.  Slots have some advantages over existing
> techniques, as explained in the documentation.
>
> In a few places, we refer to the type of replication slots introduced
> by this patch as "physical" slots, because forthcoming patches for
> logical decoding will also have slots, but with somewhat different
> properties.

This patch changed basebackup.c so that it skips pg_replslot. It's OK
to skip all files in that directory, but an empty pg_replslot must be
included in the backup. Otherwise we cannot start PostgreSQL from
the backup taken via pg_basebackup. Attached patch fixes this problem.

Regards,

--
Fujii Masao

Attachment

pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Introduce replication slots.
Next
From: Andres Freund
Date:
Subject: Re: pgsql: Introduce replication slots.