Re: refresh materialized view concurrently - Mailing list pgsql-hackers

From Tom Lane
Subject Re: refresh materialized view concurrently
Date
Msg-id 25398.1372881866@sss.pgh.pa.us
Whole thread Raw
In response to Re: refresh materialized view concurrently  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
Kevin Grittner <kgrittn@ymail.com> writes:
> Further testing shows that any UPDATE or DELETE statement acquires
> a RowExclusiveLock on every index on the table and holds it until
> end of transaction, whether or not any rows are affected and
> regardless of whether an index scan or a seqscan is used.� In fact,
> just an EXPLAIN of an UPDATE or DELETE does so.� It is only INSERT
> which releases the locks at the end of the statement.

Hm, possibly the planner is taking those locks.  I don't think the
executor's behavior is any different.  But the planner only cares about
indexes in SELECT/UPDATE/DELETE, since an INSERT has no interest in
scanning the target table.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [9.4 CF 1] The Commitfest Slacker List
Next
From: Michael Meskes
Date:
Subject: Re: [9.4 CF 1] The Commitfest Slacker List