From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: record identical operator |
Date: | 2013-09-24 22:46:37 |
Message-ID: | 1380062797.74080.YahooMailNeo@web162902.mail.bf1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Stephen Frost <sfrost(at)snowman(dot)net> wrote:
>> I think the conservative (and therefore correct) approach is to
>> decide that we're always going to update if we detect any
>> difference at all.
>
> And there may be users who are surprised that a refresh changed
> parts of the table that have nothing to do with what was changed
> in the underlying relation, because a different plan was used and
> the result ended up being binary-different.
Binary different for "equal" values could include box (or other
geometry) objects moved to completely new locations and/or not
quite the same size.
Here is v2 of the patch which changes from the universally disliked
operator names v1 used. It also fixes bugs in the row comparisons
for pass-by-reference types, fixes a couple nearby comments, and
adds regression tests for a matview containing a box column.
The box type is interesting in that its = operator only worries
about the area of the box, and considers two boxes with no more
than EPSILON difference to be equal. This means that boxes at
totally different locations can be equal, and that if A = B and B =
C it is not necessarily true that A = C. This doesn't cause too
much trouble in general because boxes don't have btree opclasses.
Since there are types, including core types, without a default
btree opclass, materialized views containing them cannot use RMVC
as currently committed. This patch would fix that, or we could rip
out the current implementation and go to the "delete everything and
insert the entire new matview contents" approach.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
record-identical-v2.patch | text/x-diff | 29.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Farina | 2013-09-24 23:15:29 | Re: Some interesting news about Linux 3.12 OOM |
Previous Message | Alvaro Herrera | 2013-09-24 22:14:06 | Re: Minmax indexes |