Re: LWLocks by LockManager slowing large DB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Paul Friedman <paul(dot)friedman(at)streetlightdata(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: LWLocks by LockManager slowing large DB
Date: 2021-04-14 03:04:50
Message-ID: 3440776.1618369490@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2021-04-13 19:16:46 -0400, Tom Lane wrote:
>> Like this? This passes check-world, modulo the one very-unsurprising
>> regression test change. I've not tried to do any performance testing.

> I wonder if there's a realistic chance it could create additional
> deadlocks that don't exist right now?

Not on user tables, because we'd always be holding at least as much
of a lock on the parent table. However ...

> Would it be a problem that we'd still release the locks on catalog
> tables early, but not on its toast table?

... hmm, not sure. I can't immediately think of a scenario where
it'd be problematic (or any more problematic than DDL on a catalog
would be anyway). But that doesn't mean there isn't one.

The concerns that had come to my mind were more along the lines
of things like pg_dump requiring a larger footprint in the shared
lock table. We could alleviate that by increasing the default
value of max_locks_per_transaction, perhaps.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andres Freund 2021-04-14 03:48:16 Re: LWLocks by LockManager slowing large DB
Previous Message Andres Freund 2021-04-14 01:01:58 Re: LWLocks by LockManager slowing large DB