pgsql: Add record_image_ops opclass for matview concurrent refresh.

From: Kevin Grittner <kgrittn(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add record_image_ops opclass for matview concurrent refresh.
Date: 2013-10-09 19:44:45
Message-ID: E1VTzgb-0001Yb-PR@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Add record_image_ops opclass for matview concurrent refresh.

REFRESH MATERIALIZED VIEW CONCURRENTLY was broken for any matview
containing a column of a type without a default btree operator
class. It also did not produce results consistent with a non-
concurrent REFRESH or a normal view if any column was of a type
which allowed user-visible differences between values which
compared as equal according to the type's default btree opclass.
Concurrent matview refresh was modified to use the new operators
to solve these problems.

Documentation was added for record comparison, both for the
default btree operator class for record, and the newly added
operators. Regression tests now check for proper behavior both
for a matview with a box column and a matview containing a citext
column.

Reviewed by Steve Singer, who suggested some of the doc language.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f566515192461acd8d9c232f48ddac3fc965cfd8

Modified Files
--------------
contrib/citext/expected/citext.out | 41 +++
contrib/citext/expected/citext_1.out | 41 +++
contrib/citext/sql/citext.sql | 23 ++
doc/src/sgml/func.sgml | 111 +++++--
src/backend/commands/matview.c | 10 +-
src/backend/utils/adt/rowtypes.c | 494 ++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_amop.h | 10 +
src/include/catalog/pg_amproc.h | 1 +
src/include/catalog/pg_opclass.h | 1 +
src/include/catalog/pg_operator.h | 14 +
src/include/catalog/pg_opfamily.h | 1 +
src/include/catalog/pg_proc.h | 12 +-
src/include/utils/builtins.h | 7 +
src/test/regress/expected/matview.out | 22 +-
src/test/regress/expected/opr_sanity.out | 7 +-
src/test/regress/sql/matview.sql | 15 +-
17 files changed, 775 insertions(+), 37 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2013-10-10 01:24:00 pgsql: Allow dynamic allocation of shared memory segments.
Previous Message Bruce Momjian 2013-10-09 12:45:06 pgsql: doc: fix typo in release notes

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-10-09 20:10:23 Re: Auto-tuning work_mem and maintenance_work_mem
Previous Message Pavel Stehule 2013-10-09 19:36:47 Re: pg_system_identifier()