Re: counting algorithm for incremental matview maintenance - Mailing list pgsql-hackers

From Robert Haas
Subject Re: counting algorithm for incremental matview maintenance
Date
Msg-id CA+TgmoaRcgCAtr_hFuvFOB68bSMG5aEFE88bzOMYMbq2N-YugA@mail.gmail.com
Whole thread Raw
In response to counting algorithm for incremental matview maintenance  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: counting algorithm for incremental matview maintenance  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
On Tue, May 14, 2013 at 3:52 PM, Kevin Grittner <kgrittn@ymail.com> wrote:
> We could drive the triggering of incremental maintenance off of the
> dependency information which is already stored, but for performance
> we probably want to add a new pg_class flag to indicate that the
> relation is referenced by a matview definition which specifies
> incremental update.  That would allow a fast path for skipping
> other tests for DML on non-referenced relations, at the expense of
> some additional catalog updates on some DDL.

I'm afraid this might require creating a matview or updating the
definition of a matview to refer to different relations to take
AccessExclusiveLock on those relations, in order to avoid SnapshotNow
problems while updating this flag for those relations, and I think
that's probably unacceptable.  Some thought may be needed here to come
up with a good solution.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Extent Locks
Next
From: Robert Haas
Date:
Subject: Re: [BUGS] BUG #8167: false EINVAL -22 for opening a file