Re: Partitioned tables and locks - Mailing list pgsql-general

From Tom Lane
Subject Re: Partitioned tables and locks
Date
Msg-id 6714.1576762716@sss.pgh.pa.us
Whole thread Raw
In response to Partitioned tables and locks  (James Sewell <james.sewell@jirotech.com>)
Responses Re: Partitioned tables and locks
List pgsql-general
James Sewell <james.sewell@jirotech.com> writes:
> Is it expected that a lock on a partitioned table will take out 2 locks per
> child regardless of the number of children which are excluded at plan time?

Depends on the details of your query, and on which PG version you're
using, but it's by no means surprising for each child table to get
locked.  (I'm not sure where *two* locks would come from, though.)

If you're working with massively partitioned tables, increasing
max_locks_per_transaction is a good idea.

            regards, tom lane



pgsql-general by date:

Previous
From: Fabio Ugo Venchiarutti
Date:
Subject: Re: Commit to primary with unavailable sync standby
Next
From: Maksim Milyutin
Date:
Subject: Re: Commit to primary with unavailable sync standby