From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Rosser Schwarz <rosser(dot)schwarz(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch: add --if-exists to pg_recvlogical |
Date: | 2017-09-22 19:31:40 |
Message-ID: | f23c6a75-c0fe-4d35-e4ed-93f3f8160423@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 9/20/17 02:26, Rosser Schwarz wrote:
> The more I think about it, I don't think it's nonsensical, though.
> --create-slot --if-exists or --drop-slot --if-not-exists, obviously. I
> mean, do you even logic?
Those pieces make sense. We have many CREATE IF NOT EXISTS and DROP IF
EXISTS commands. The use is clear.
> Those aside, --if-exists just means a non-existent slot isn't an error
> condition, doesn't it? --start --if-exists will start, if the slot
> exists. Otherwise it won't, in neither case raising an error. Exactly
> what it says on the tin. Perhaps the docs could make clear that
> combination implies --no-loop (or at least means we'll exit immediately)
> if the slot does not, in fact, exist?
A non-terrible definition could perhaps be arrived at here, but it's not
clear why one would need this. We don't have SELECT FROM IF EXISTS, either.
I suggest you create a patch that focuses on the --create part.
You can create a separate follow-on patch for the --start part if you
wish, but I think that that patch would be rejected.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Julien Rouhaud | 2017-09-22 19:34:11 | Re: [Proposal] Make the optimiser aware of partitions ordering |
Previous Message | Pavel Stehule | 2017-09-22 19:31:12 | Re: Re: proposal - psql: possibility to specify sort for describe commands, when size is printed |