Re: [BUGS] BUG #14571: 10.0 devel hang when create subscription - Mailing list pgsql-bugs

From Petr Jelinek
Subject Re: [BUGS] BUG #14571: 10.0 devel hang when create subscription
Date
Msg-id 7a291899-090b-78c4-c39d-4988bbdb51e9@2ndquadrant.com
Whole thread Raw
In response to [BUGS] BUG #14571: 10.0 devel hang when create subscription  (digoal@126.com)
List pgsql-bugs
On 27/02/17 09:13, digoal@126.com wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      14571
> Logged by:          Zhou Digoal
> Email address:      digoal@126.com
> PostgreSQL version: Unsupported/Unknown
> Operating system:   CentOS 6.x x64
> Description:        
> 
> HI,
>   i use this commit:
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=snapshot;h=1513dbea7f89053476a5e95e2f2e952135a5b34c;sf=tgz
> 
>   when i create subscription , client hang .
> 
> this is bt:
> 
> (gdb) bt
> #0  0x00007f0ab9e7df13 in __epoll_wait_nocancel () from /lib64/libc.so.6
> #1  0x0000000000846636 in WaitEventSetWait ()
> #2  0x0000000000846a83 in WaitLatchOrSocket ()
> #3  0x00007f0aaad5fed1 in libpqrcv_PQexec () from
> /home/digoal/pgsql10/lib/libpqwalreceiver.so
> #4  0x00007f0aaad5fff7 in libpqrcv_create_slot () from
> /home/dege.zzz/pgsql10/lib/libpqwalreceiver.so
> #5  0x000000000059e101 in CreateSubscription ()
> #6  0x00000000005e1f09 in ProcessUtilitySlow.isra.7 ()
> #7  0x00000000005e2f19 in standard_ProcessUtility ()
> #8  0x00000000005e3ab5 in PortalRunUtility ()
> #9  0x00000000005e7a8f in PortalRunMulti ()
> #10 0x00000000005e8550 in PortalRun ()
> #11 0x00000000005eb2d9 in exec_simple_query ()
> #12 0x00000000005ee4e5 in PostgresMain ()
> #13 0x0000000000471cc1 in ServerLoop ()
> #14 0x0000000000674e1b in PostmasterMain ()
> #15 0x000000000087ad32 in main ()
> 

Hi,

okay so it hangs on slot creation. Slot creation can usually hang in two
possible cases,
a) either you tried to make loopback replication connection (the
connection string given to CREATE SUBSCRIPTION points to same database
you are executing it in) or
b) there is a long running transaction on the PUBLICATION side.

Does either of these explain what you see?

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: digoal@126.com
Date:
Subject: [BUGS] BUG #14571: 10.0 devel hang when create subscription
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14570: Validation error