Re: pgsql: Introduce replication slots.

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Introduce replication slots.
Date: 2014-02-01 09:09:24
Message-ID: 20140201090924.GC17636@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2014-02-01 16:47:47 +0900, Fujii Masao wrote:
> On Sat, Feb 1, 2014 at 12:50 PM, Robert Haas <rhaas(at)postgresql(dot)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.

That's a pretty fair point. Not sure how that could escape my
notice. The patch does look sane to me.

I wonder if we additionally should add code to recreate pg_replslot on
startup, similar to pg_xlog?

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2014-02-01 09:33:08 Re: pgsql: Introduce replication slots.
Previous Message Fujii Masao 2014-02-01 07:47:47 Re: pgsql: Introduce replication slots.