Re: [HACKERS] If subscription to foreign table valid ?

Поиск
Список
Период
Сортировка
От tushar
Тема Re: [HACKERS] If subscription to foreign table valid ?
Дата
Msg-id ecf62b77-7ef5-5cfb-2e85-a8507c56c3fa@enterprisedb.com
обсуждение исходный текст
Ответ на Re: [HACKERS] If subscription to foreign table valid ?  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Список pgsql-hackers
On 05/11/2017 07:13 PM, Petr Jelinek wrote:
> I think it does make sense to add check for this into CREATE/ALTER
> SUBSCRIBER though so that user is informed immediately about the mistake
> rather than by errors in the logs later.
+1 , there are  few similar cases   - where user does not  get error at 
prompt , for instance
--when publication doesn't not exist
postgres=# create subscription sub connection 'dbname=postgres port=5000 
user=centos password=a' publication nowhere;
NOTICE:  synchronized table states
NOTICE:  created replication slot "sub" on publisher
CREATE SUBSCRIPTION
--No check validation for Publication name in ALTER
postgres=# alter subscription sub set publication _ refresh;
ALTER SUBSCRIPTION
--slot name given in ALTER
postgres=# alter subscription sub with ( slot name='nowhere');
ALTER SUBSCRIPTION
--and due to that , we are not able to drop it later.
postgres=# drop subscription sub;
ERROR:  could not drop the replication slot "nowhere" on publisher
DETAIL:  The error was: ERROR:  replication slot "nowhere" does not exist
postgres=#

-- 
regards,tushar
EnterpriseDB  https://www.enterprisedb.com/
The Enterprise PostgreSQL Company




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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] UPDATE of partition key
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] Time based lag tracking for logical replication