Re: record identical operator

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: record identical operator
Date: 2013-09-24 17:04:49
Message-ID: 20130924170449.GV2706@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Robert Haas (robertmhaas(at)gmail(dot)com) wrote:
> On Tue, Sep 24, 2013 at 12:00 PM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> > It wouldn't address my concerns anyway, which are around these binary
> > operators and the update-in-place approach being risky and setting us up
> > for problems down the road.
>
> I think that if you want to hold up a bug fix to a feature that's
> already committed, you need to be more specific than to say that there
> might be problems down the road.

Committed isn't released and I simply can't agree that introducing new
operators is a 'bug fix'. Had it gone out as-is, I can't see us
back-patching a bunch of new operators to fix it.

> Note that, after we change the data in the underlying table, the
> output of the query changes. But REFRESH MATERIALIZED VIEW
> CONCURRENTLY doesn't fix it. However, REFRESH MATERIALIZED VIEW
> without CONCURRENTLY does fix it. That's a bug, because if there are
> two ways of refreshing a materialized view they should both produce
> the same answer. Shouldn't they?

The same queries run over time without changes to the underlying data
really should return the same data, shoudln't they? Is it a bug that
they don't?

In general, I agree that they should produce the same results, as should
incrementally maintained views when they happen. I'm not convinced that
choosing whatever the 'new' value is to represent the value in the
matview for the equal-but-not-binary-identical will always be the
correct answer though.

> The fact that users can write
> queries that don't always give the same answer is not a reason why
> it's OK for REFRESH CONCURRENTLY to misbehave on queries that do.

This really is, imv, agreeing to hold a higher standard for matviews
than we do for what matviews are *based* on- which is queries.

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-09-24 17:07:34 Re: Some interesting news about Linux 3.12 OOM
Previous Message Alvaro Herrera 2013-09-24 16:51:04 Re: FW: REVIEW: Allow formatting in log_line_prefix