Re: Different results from identical matviews

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Anders Steinlein <anders(at)e5r(dot)no>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Different results from identical matviews
Date: 2020-07-02 15:25:13
Message-ID: CAKFQuwZK0s+qYi38jLXnXFt4ihJBeXZSQxJ6x3RwSxfbE+XxKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 2, 2020 at 8:06 AM Anders Steinlein <anders(at)e5r(dot)no> wrote:

> On Thu, Jul 2, 2020 at 3:55 PM David G. Johnston <
> david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
>> On Thursday, July 2, 2020, Anders Steinlein <anders(at)e5r(dot)no> wrote:
>>>
>>>
>>> I just wanted to add that we're on Postgres 12.3. This matview has been
>>> with us since 9.4 days, and we have not experienced any such issues before
>>> (could be customers who haven't noticed or reported it to us, of course...).
>>> version
>>>
>>>
>>> ---------------------------------------------------------------------------------------------------------------------------------
>>> PostgreSQL 12.3 (Ubuntu 12.3-1.pgdg18.04+1) on x86_64-pc-linux-gnu,
>>> compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
>>>
>>
>>
>> I concur that the determinism doesn’t seem like a problem - but not much
>> else does either. As a shot in the dark does pg_depend show any
>> differences between the dependencies for the two views?
>>
>
> Could be worth checking, yes. Could you give me any guidance as to how to
> compare this? Never looked at pg_depend before -- which of the columns
> should have the oid for the matview I want to look up dependencies for?
>

It would be an educational/trial-and-error experience for me as well. That
you found a difference in pg_rewrite.ev_action probably provides a more
fruitful avenue of attack though I'm inexperienced there as well. I do
believe that inspecting pg_depend will also highlight whatever difference
you are seeing in the ev_action. What tickles my curiosity is why that
difference (whatever it is, I haven't looked) isn't manifesting in the \d+
output for the materialized view.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2020-07-02 15:32:52 Re: restore_command for postgresql streaming replication
Previous Message Francisco Olarte 2020-07-02 15:18:14 Re: Catching errors with Perl DBI