On 05/25/2017 12:44 AM, Petr Jelinek wrote:
There is still outstanding issue that sync worker will keep running
inside the long COPY because the invalidation messages are also not
processed until it finishes but all the original issues reported here
disappear for me with the attached patches applied.
After applying all your patches, drop subscription no more hangs while
dropping subscription but there is an error "ERROR: tuple
concurrently updated" in the log file of
standby.
---
logical replication synchronization worker finished processing
2017-05-25 09:15:52.654 BST [18575] LOG: logical replication
synchronization worker finished processing
2017-05-25 09:15:52.656 BST [18563] LOG: starting logical replication
worker for subscription "sub"
2017-05-25 09:15:52.662 BST [18577] LOG: logical replication sync for
subscription sub, table t14 started
2017-05-25 09:15:53.657 BST [18563] LOG: starting logical replication
worker for subscription "sub"
2017-05-25 09:15:53.663 BST [18579] LOG: logical replication sync for
subscription sub, table t15 started
2017-05-25 09:15:53.724 BST [18563] FATAL: terminating logical
replication worker due to administrator command
2017-05-25 09:15:53.725 BST [18521] LOG: worker process: logical
replication worker for subscription 16684 (PID 18563) exited with exit
code 1
2017-05-25 09:15:54.734 BST [18579] ERROR: tuple concurrently updated
2017-05-25 09:15:54.735 BST [18577] ERROR: tuple concurrently updated
2017-05-25 09:15:54.736 BST [18521] LOG: worker process: logical
replication worker for subscription 16684 sync 16426 (PID 18579) exited
with exit code 1
2017-05-25 09:15:54.736 BST [18521] LOG: worker process: logical
replication worker for subscription 16684 sync 16423 (PID 18577) exited
with exit code 1
~
~
~
Steps to reproduce -
X cluster -> create 100 tables , publish all tables (create publication
pub for all tables);
Y Cluster -> create 100 tables ,create subscription(create subscription
sub connection 'user=centos host=localhost' publication pub;
Y cluster ->drop subscription - drop subscription sub;
check the log file on Y cluster.
Sometime , i have seen this error on psql prompt and drop subscription
operation got failed at first attempt.
postgres=# drop subscription sub;
ERROR: tuple concurrently updated
postgres=# drop subscription sub;
NOTICE: dropped replication slot "sub" on publisher
DROP SUBSCRIPTION
--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers