Re: pg_receivexlog and replication slots

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_receivexlog and replication slots
Date: 2014-07-11 09:18:58
Message-ID: CABUevEyVGH46X9wKoePFTJzdzzrK_WwTRm8xWg8LiY4FVPHYJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 11, 2014 at 11:14 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> On 2014-07-11 11:08:48 +0200, Magnus Hagander wrote:
>> Is there a particular reason why pg_receivexlog only supports using
>> manually created slots but pg_recvlogical supports creating and
>> dropping them? Wouldn't it be good for consistency there?
>
> I've added it to recvlogical because logical decoding isn't usable
> without slots. I'm not sure what you'd want to create/drop a slot from
> receivexlog for, but I'm not adverse to adding the capability.

I was mostly thinking for consistency, really. Using slots with
pg_receivexlog makes quite a bit of sense, even though it's useful
without it. But having the ability to create and drop (with compatible
commandline arguments of course) them directly when you set it up
would certainly be more convenient.

>> I'm guessing it's related to not being exposed over the replication
>> protocol?
>
> It's exposed:
> create_replication_slot:
> /* CREATE_REPLICATION_SLOT slot PHYSICAL */
> K_CREATE_REPLICATION_SLOT IDENT K_PHYSICAL

Hmm. You know, it would help if I actually looked at a 9.4 version of
the file when I check for functions of this kind :) Thanks!

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2014-07-11 09:22:04 Incorrect comment in postgres_fdw.c
Previous Message Andres Freund 2014-07-11 09:14:22 Re: pg_receivexlog and replication slots