Re: [HACKERS] If subscription to foreign table valid ? - Mailing list pgsql-hackers

From tushar
Subject Re: [HACKERS] If subscription to foreign table valid ?
Date
Msg-id ecf62b77-7ef5-5cfb-2e85-a8507c56c3fa@enterprisedb.com
Whole thread Raw
In response to Re: [HACKERS] If subscription to foreign table valid ?  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
List 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 by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] UPDATE of partition key
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] Time based lag tracking for logical replication