Re: [HACKERS] Patch: add --if-exists to pg_recvlogical

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] Patch: add --if-exists to pg_recvlogical
Дата
Msg-id f23c6a75-c0fe-4d35-e4ed-93f3f8160423@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Patch: add --if-exists to pg_recvlogical  (Rosser Schwarz <rosser.schwarz@gmail.com>)
Ответы Re: [HACKERS] Patch: add --if-exists to pg_recvlogical  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список 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


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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] Re: proposal - psql: possibility to specify sort fordescribe commands, when size is printed
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: [HACKERS] [Proposal] Make the optimiser aware of partitions ordering