Re: BUG #14571: 10.0 devel hang when create subscription

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: digoal(at)126(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14571: 10.0 devel hang when create subscription
Date: 2017-02-27 14:18:44
Message-ID: 7a291899-090b-78c4-c39d-4988bbdb51e9@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 27/02/17 09:13, digoal(at)126(dot)com wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14571
> Logged by: Zhou Digoal
> Email address: digoal(at)126(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-02-27 14:58:15 Re: BUG #14570: Validation error
Previous Message digoal 2017-02-27 08:13:38 BUG #14571: 10.0 devel hang when create subscription