Re: pg_receivexlog and replication slots

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, furuyao(at)pm(dot)nttdata(dot)co(dot)jp, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_receivexlog and replication slots
Date: 2014-10-04 06:01:03
Message-ID: CAB7nPqRLaxOTo+f-7eff=TD25QsAkafX9vqxuN1TR4eZGQZVkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 3, 2014 at 8:57 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > <para>
> > + <application>pg_receivexlog</application> can run in one of two following
> > + modes, which control physical replication slot:
>
> I don't think that's good enough. There's also the important mode where
> it's not doing --create/--drop at all.
Well, yes, however the third mode is not explicitly present, and I
don't see much point in adding a --start mode thinking
backward-compatibility. Now, I refactored a bit the documentation to
mention that pg_receivexlog can perform additional actions to control
replication slots. I added as well in the portion of option --slot how
it interacts with --create-slot and --drop-slot.

> > + if (db_name)
> > + {
> > + fprintf(stderr,
> > + _("%s: database defined for replication connection \"%s\"\n"),
> > + progname, replication_slot);
> > + disconnect_and_exit(1);
> > + }
>
> I don't like 'defined' here. 'replication connection unexpectedly is
> database specific' or something would be better.

Sure, IMO the error message should as well mention the replication
slot being used, so I reformulated as such:
"replication connection using slot foo is unexpectedly database specific"

>
> I do wonder whether --create/--drop aren't somewhat weird for
> pg_receivexlog. It's not that clear what it means. It'd be ugly, but we
> could rename them --create-slot/drop-slot.

In line with the other patch sent earlier, options are renamed to
--create-slot and --drop-slot.
Regards,
--
Michael

Attachment Content-Type Size
20141005_receivexlog_repslot.patch text/x-diff 8.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-10-04 06:21:08 Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale
Previous Message james 2014-10-04 05:57:03 Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale