Why release index relation lock - Mailing list pgsql-general

From DT
Subject Why release index relation lock
Date
Msg-id BAY173-W528399A71D28B3547E7CCCE6F40@phx.gbl
Whole thread Raw
Responses Re: Why release index relation lock
Re: Why release index relation lock
List pgsql-general
Hi,

  For some operations, such as INSERT/UPDATE, heap relation lock is held until
xact commit, but index relation lock is released after command end. Some other
operations also hold index relation lock until xact commit, such as VACUUM.

  I have read chapter 54. Index Access Method Interface Definition in documentation,
and README in nbtree, but still can not figure out:
1. What's the rule of index relation locking?
2. Releasing lock is for higher concurrency, but for INSERT/UPDATE, i did not find
   any operation that could get benefit from releasing index relation lock? Or to
   say : what will happen if we treat index relation lock like heap relation lock?

Thanks.

pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Excellent article on SQL
Next
From: Frank Church
Date:
Subject: How can I run a PostgreSQL database outside /var/run/postgresql?