Le 07/07/2015 14:55, Andres Freund a écrit :
> On 2015-06-19 17:21:25 +0200, Cédric Villemain wrote:
>>> To make slot usage in pg_receivexlog easier, should we add
>>> --create-slot-if-not-exists? That'd mean you could run the same command
>>> the first and later invocation.
>> +1 (with a shorter name please, if you can find one... )
> How about a seperate --if-not-exists modifier? Right now --create works
> as an abbreviation for --create-slot, but --create-slot-if-not-exists
> would break that.

Having done a quick overview of other binaries provided by postgresql I
realized that pg_receivexlog is distinct from other tools creating
something at a sql level: for db, role and lang we have create and drop
as distinct commands. Both dropdb and dropuser have a '--if-exists'
(like in SQL) but have not for create operation.
Maybe we should have used createslot/dropslot in the first place and use
--if-exists --if-not-exists accordingly.
Having all in one tool, adding one or both options looks good to me.

The only alternative I see is more like "--force": return success even
if the operation was not required (create or drop).

Cédric Villemain +33 (0)6 20 30 22 52
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to