From: | tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> |
---|---|
To: | Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: If subscription to foreign table valid ? |
Date: | 2017-05-12 09:30:24 |
Message-ID: | ecf62b77-7ef5-5cfb-2e85-a8507c56c3fa@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2017-05-12 10:19:17 | Re: Time based lag tracking for logical replication |
Previous Message | Amit Kapila | 2017-05-12 09:26:02 | Re: UPDATE of partition key |