Re: logical replication busy-waiting on a lock

From: Andres Freund <andres(at)anarazel(dot)de>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logical replication busy-waiting on a lock
Date: 2017-05-29 18:40:26
Message-ID: 20170529184026.oro3slej32cpiayb@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017-05-29 11:38:20 -0700, Jeff Janes wrote:
> Related, but not the same. It would be nice if they didn't block, but if
> they do have to block, shouldn't it wait on a semaphore, rather than doing
> a tight loop? It looks like maybe a latch didn't get reset when it should
> have or something.

The code certainly is trying to just block using a lock (on the xid of
the running xact), there shouldn't be any busy looping going on...
There's no latch involved, so something is certainly weird here.

- Andres

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Ladhe 2017-05-29 18:42:53 Re: fix side-effect in get_qual_for_list()
Previous Message Jeff Janes 2017-05-29 18:38:20 Re: logical replication busy-waiting on a lock