]> granicus.if.org Git - postgresql/commit
Move materialized views' is-populated status into their pg_class entries.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 6 May 2013 17:26:51 +0000 (13:26 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 6 May 2013 17:27:22 +0000 (13:27 -0400)
commit1d6c72a55b23554cfb946527dc77f9d80044ae2c
tree8f7964a0114022585c1a0d90f37d2fd466bb6154
parent5da5798004e90b14332918e7db702271442d465d
Move materialized views' is-populated status into their pg_class entries.

Previously this state was represented by whether the view's disk file had
zero or nonzero size, which is problematic for numerous reasons, since it's
breaking a fundamental assumption about heap storage.  This was done to
allow unlogged matviews to revert to unpopulated status after a crash
despite our lack of any ability to update catalog entries post-crash.
However, this poses enough risk of future problems that it seems better to
not support unlogged matviews until we can find another way.  Accordingly,
revert that choice as well as a number of existing kluges forced by it
in favor of creating a pg_class.relispopulated flag column.
22 files changed:
doc/src/sgml/catalogs.sgml
doc/src/sgml/func.sgml
src/backend/catalog/heap.c
src/backend/catalog/system_views.sql
src/backend/commands/cluster.c
src/backend/commands/createas.c
src/backend/commands/matview.c
src/backend/commands/vacuumlazy.c
src/backend/utils/adt/dbsize.c
src/backend/utils/cache/relcache.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/include/catalog/catversion.h
src/include/catalog/heap.h
src/include/catalog/pg_class.h
src/include/catalog/pg_proc.h
src/include/commands/matview.h
src/include/utils/builtins.h
src/include/utils/rel.h
src/test/regress/expected/matview.out
src/test/regress/expected/rules.out
src/test/regress/sql/matview.sql