From: | tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Server Crashes if try to provide slot_name='none' at the time of creating subscription. |
Date: | 2017-05-16 13:06:29 |
Message-ID: | 2825fb11-82c0-ee59-780f-73dba0c58c25@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 05/16/2017 06:35 AM, Masahiko Sawada wrote:
> I've updated Kuntal's patch, added regression test for option
> combination and updated documentation.
While testing the patch - I found that after dump/restore , we are
getting an error in the log file once we enable the subscription
\\create subscription
postgres=# CREATE SUBSCRIPTION m1 CONNECTION 'dbname=postgres port=5000
' PUBLICATION qdd WITH (slot_name='none');
NOTICE: synchronized table states
CREATE SUBSCRIPTION
\\take the dump
[centos(at)centos-cpula bin]$ ./pg_dump -Fp -p 9000 postgres > /tmp/d.c
\\check the syntax
[centos(at)centos-cpula bin]$ cat /tmp/d.c |grep 'create subsc*' -i
CREATE SUBSCRIPTION m1 CONNECTION 'dbname=postgres port=5000 '
PUBLICATION qdd WITH (connect = false, slot_name = '');
\\execute this same syntax against a new database
postgres=# create database test;
CREATE DATABASE
postgres=# \c test
You are now connected to database "test" as user "centos".
test=# CREATE SUBSCRIPTION m1 CONNECTION 'dbname=postgres port=5000 '
PUBLICATION qdd WITH (connect = false, slot_name = '');
WARNING: tables were not subscribed, you will have to run ALTER
SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
CREATE SUBSCRIPTION
test=# alter subscription m1 refresh publication ;
ERROR: ALTER SUBSCRIPTION ... REFRESH is not allowed for disabled
subscriptions
test=# alter subscription m1 enable ;
ALTER SUBSCRIPTION
Check the message in log file
017-05-16 14:04:48.373 BST [18219] LOG: logical replication apply for
subscription m1 started
2017-05-16 14:04:48.381 BST [18219] ERROR: could not start WAL
streaming: ERROR: replication slot name "" is too short
2017-05-16 14:04:48.382 BST [17843] LOG: worker process: logical
replication worker for subscription 16386 (PID 18219) exited with exit
code 1
2017-05-16 14:04:53.388 BST [17850] LOG: starting logical replication
worker for subscription "m1"
2017-05-16 14:04:53.396 BST [18224] LOG: logical replication apply for
subscription m1 started
2017-05-16 14:04:53.403 BST [18224] ERROR: could not start WAL
streaming: ERROR: replication slot name "" is too short
Is this error message (ERROR: replication slot name "" is too short )
is expected now ?
--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-05-16 13:20:43 | Re: [POC] hash partitioning |
Previous Message | Peter Eisentraut | 2017-05-16 13:01:11 | Re: GCC 7 warnings |