Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock(PG10.7)

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>, chenhj <chjischj@163.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-09-30T19:07:11Z
Lists: pgsql-hackers
On Sun, Sep 29, 2019 at 10:38 PM Andrey Borodin <x4mmm@yandex-team.ru> wrote:
> As far as I understand deleted page is stamped with
> GinPageSetDeleteXid(page, ReadNewTransactionId());
> It will not be recycled until that Xid is far behind.

That only gets used within posting tree pages, though.
ginInsertCleanup() is concerned with pending list pages.

> BTW we found a small bug (wraparound) in similar GiST and B-tree implementations.
> Probably, it's there in GIN too.

Probably, but that's much less of a problem to me.

-- 
Peter Geoghegan



Commits

  1. Fix traversing to the deleted GIN page via downlink

  2. Revise GIN README

  3. Fix deadlock between ginDeletePage() and ginStepRight()