Re: pg_receivexlog and replication slots

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(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-06 10:14:21
Message-ID: 20141006101421.GA26194@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-10-04 14:25:27 +0900, Michael Paquier wrote:
> And as I am on it, attached is a patch that can be applied to master and
> REL9_4_STABLE to rename the --create and --drop to --create-slot and
> --drop-slot.

Thanks.

> diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c
> index c48cecc..585d7b0 100644
> --- a/src/bin/pg_basebackup/pg_recvlogical.c
> +++ b/src/bin/pg_basebackup/pg_recvlogical.c
> @@ -91,8 +91,8 @@ usage(void)
> " time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
> printf(_(" -S, --slot=SLOT name of the logical replication slot\n"));
> printf(_("\nAction to be performed:\n"));
> - printf(_(" --create create a new replication slot (for the slot's name see --slot)\n"));
> - printf(_(" --start start streaming in a replication slot (for the slot's name see --slot)\n"));
> + printf(_(" --create-slot create a new replication slot (for the slot's name see --slot)\n"));
> + printf(_(" --start-slot start streaming in a replication slot (for the slot's name see --slot)\n"));
> printf(_(" --drop drop the replication slot (for the slot's name see --slot)\n"));
> printf(_("\nReport bugs to <pgsql-bugs(at)postgresql(dot)org>.\n"));
> }
> @@ -618,9 +618,9 @@ main(int argc, char **argv)
> {"status-interval", required_argument, NULL, 's'},
> {"slot", required_argument, NULL, 'S'},
> /* action */
> - {"create", no_argument, NULL, 1},
> + {"create-slot", no_argument, NULL, 1},
> {"start", no_argument, NULL, 2},
> - {"drop", no_argument, NULL, 3},
> + {"drop-slot", no_argument, NULL, 3},
> {NULL, 0, NULL, 0}

Uh? You're documenting --start-slot here and a couple other places, but
you implement --drop-slot. And --start-slot doesn't seem to make much
sense to me.

I've pushed a polished up version. Fixing the above and
logicaldecoding.sgml

Note that at least gnu's getopt_long() accepts --create for
--create-slot...

Thanks,

Andres Freund

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Feike Steenbergen 2014-10-06 10:36:17 Add regression tests for autocommit-off mode for psql and fix some omissions
Previous Message Etsuro Fujita 2014-10-06 10:07:00 Improve automatic analyze messages for inheritance trees