Re: Why postgres take RowExclusiveLock on all partition

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sachin Kotwal <kotsachin(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why postgres take RowExclusiveLock on all partition
Date: 2016-09-16 14:11:12
Message-ID: 18090.1474035072@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sachin Kotwal <kotsachin(at)gmail(dot)com> writes:
> Does it release locks after taking decision and then perform actual update
> operation on partition table?

No, there's no attempt to do that, and we're unlikely to consider doing so
because it would result in more lock-table thrashing. Why do you care?
RowExclusiveLock does not block any normal DML operation, so there's no
apparent benefit from releasing it early.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-09-16 14:18:35 Re: [PROPOSAL][PROTOTYPE] Individual options for each index column: Opclass options
Previous Message Christoph Berg 2016-09-16 14:11:06 Re: OpenSSL 1.1 breaks configure and more