Re: behave of --create-slot option

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: behave of --create-slot option
Date: 2018-06-01 12:00:36
Message-ID: 20180601120036.GA9004@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 31, 2018 at 10:59:04PM -0400, Robert Haas wrote:
> On Wed, May 30, 2018 at 2:00 PM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>> Hm. There could be an argument for improving the user experience here
>> so as some cleanup is at least attempted except if --no-clean is defined
>> by the caller when --create-slot is used. Do we want an open item for
>> this issue?
>
> Sounds like new development to me. This isn't a bug.

Still, it seems to me that the user experience is a bit horrible with
this new interface of pg_basebackup. If --create-slot is used, then a
slot is created before starting a backup. If the slot already exists,
then pg_basebackup complains and exits. In order to drop the slot with
a only user who has replication access rights (because nobody is really
going to have a user who has SQL access so as the slot is dropped), then
the only simple way is to use pg_receivewal --drop-slot, making the
whole flow inconsistent. pg_basebackup is usually in server-side
packages, and pg_receivewal is on the client side. The server packages
requiring the client packages, then we are sure that pg_basebackup will
drag in pg_receivewal.

Still, shouldn't there be a --drop-slot option in pg_basebackup? In
this case, if --drop-slot is used, then the slot is dropped and
pg_basebackup exits immediately.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-06-01 12:03:57 Re: Loaded footgun open_datasync on Windows
Previous Message Christopher Wilson 2018-06-01 11:46:30 FW: Possible optimisation: push down SORT and LIMIT nodes