pgsql: Create a distinction between a populated matview and a scannable - Mailing list pgsql-committers

From Kevin Grittner
Subject pgsql: Create a distinction between a populated matview and a scannable
Date
Msg-id E1UPcu5-0000Q4-Fs@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Create a distinction between a populated matview and a scannable one.

The intent was that being populated would, long term, be just one
of the conditions which could affect whether a matview was
scannable; being populated should be necessary but not always
sufficient to scan the relation.  Since only CREATE and REFRESH
currently determine the scannability, names and comments
accidentally conflated these concepts, leading to confusion.

Also add missing locking for the SQL function which allows a
test for scannability, and fix a modularity violatiion.

Per complaints from Tom Lane, although its not clear that these
will satisfy his concerns.  Hopefully this will at least better
frame the discussion.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/52e6e33ab495cb2b0e694ee480ba7c6394315053

Modified Files
--------------
src/backend/commands/cluster.c       |   13 ++++----
src/backend/commands/createas.c      |    2 +-
src/backend/commands/matview.c       |   15 ++++-----
src/backend/executor/execMain.c      |   55 ++++++++++++++++++---------------
src/backend/rewrite/rewriteHandler.c |    3 +-
src/backend/utils/adt/dbsize.c       |   13 +++++--
src/backend/utils/cache/relcache.c   |   20 ++++++------
src/bin/pg_dump/pg_dump.c            |    4 ++-
src/include/commands/matview.h       |    2 +-
src/include/utils/rel.h              |   12 +++++++-
10 files changed, 81 insertions(+), 58 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] pgsql: Add sql_drop event for event triggers
Next
From: Dimitri Fontaine
Date:
Subject: Re: [HACKERS] pgsql: Add sql_drop event for event triggers