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:37:56
Message-ID: 20140201093756.GD17636@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2014-02-01 18:33:08 +0900, Fujii Masao wrote:
> On Sat, Feb 1, 2014 at 6:09 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > On 2014-02-01 16:47:47 +0900, Fujii Masao wrote:
> >> 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?
>
> Similar to pg_xlog/archive_status, not pg_xlog? That might be an option.
> But I'm not inclined to do that for now. The fact that the essential
> directory like pg_replslot doesn't exist indicates the symptom of
> something strange. And, changing that way might prevent us from
> detecting such symptom.

The reason I am wondering is that it makes a fair bit of sense to
exclude it in open-coded base backups as well, and excluding the
entire directory might be the easiest way there. But I guess people
manage for pg_xlog/, so it's really not something that would reduce pain
measurably.

> BTW, we should add the setting of primary_slotname into
> recovery.conf.sample?

Yes.

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 Bruce Momjian 2014-02-01 15:49:23 pgsql: arrays: tighten checks for multi-dimensional input
Previous Message Fujii Masao 2014-02-01 09:33:08 Re: pgsql: Introduce replication slots.