Обсуждение: BUG #16873: CREATE SUBSCRIPTION command hangs (Cross version logical replication) Wait event LibPQWalReceiverRec

Поиск
Список
Период
Сортировка

BUG #16873: CREATE SUBSCRIPTION command hangs (Cross version logical replication) Wait event LibPQWalReceiverRec

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      16873
Logged by:          Andriy Bartash
Email address:      abartash@xmatters.com
PostgreSQL version: 13.2
Operating system:   CentOS7
Description:

Hello
Establishing logical replication between PG12 and PG13.2 and CREATE
SUBSCRIPTION command hangs.
Query bellow shows exact command, how long it's been running and wait
event.
Source and target PG clusters are running on different VMs
SELECT query, xact_start, now(),wait_event FROM pg_stat_activity where query
like 'CREATE SUBSCRIPTION%';
                                                        query
                                        |          xact_start           |
          now              |       wait_event

---------------------------------------------------------------------------------------------------------------------+-------------------------------+-------------------------------+-------------------------
 CREATE SUBSCRIPTION "auditstore_subscription"
                                       +| 2021-02-18 23:07:23.814108+00 |
2021-02-19 00:16:37.237905+00 | LibPQWalReceiverReceive
             CONNECTION 'host=10.141.0.29 port=5432
user=auditstore_publisher password=<PWD> dbname=auditstore'+|
               |                               |
             PUBLICATION "auditstore_publication";
                                        |                               |
                           |
(1 row)


I am pretty sure, it's not a bug. I've managed to reproduce it and found that session was blocked on source database.Blocked  query:

SELECT DISTINCT t.schemaname, t.tablename

  FROM pg_catalog.pg_publication_tables t

 WHERE t.pubname IN ('auditstore_publication')

Once I killed a blocker - subscription was created.



On Thu, Feb 18, 2021 at 4:51 PM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      16873
Logged by:          Andriy Bartash
Email address:      abartash@xmatters.com
PostgreSQL version: 13.2
Operating system:   CentOS7
Description:       

Hello
Establishing logical replication between PG12 and PG13.2 and CREATE
SUBSCRIPTION command hangs.
Query bellow shows exact command, how long it's been running and wait
event.
Source and target PG clusters are running on different VMs
SELECT query, xact_start, now(),wait_event FROM pg_stat_activity where query
like 'CREATE SUBSCRIPTION%';
                                                        query               
                                        |          xact_start           |   
          now              |       wait_event
---------------------------------------------------------------------------------------------------------------------+-------------------------------+-------------------------------+-------------------------
 CREATE SUBSCRIPTION "auditstore_subscription"                             
                                       +| 2021-02-18 23:07:23.814108+00 |
2021-02-19 00:16:37.237905+00 | LibPQWalReceiverReceive
             CONNECTION 'host=10.141.0.29 port=5432
user=auditstore_publisher password=<PWD> dbname=auditstore'+|               
               |                               |
             PUBLICATION "auditstore_publication";                         
                                        |                               |   
                           |
(1 row)



--

Andriy Bartash

Database Administrator

xMatters : Digital Service Availability Platform 

abartash@xmatters.com 

----------------------------  

Free Forever | Meet Flow Designer | See it in Action