Re: pg_upgrade and materialized views - Mailing list pgsql-bugs

From Tom Lane
Subject Re: pg_upgrade and materialized views
Date
Msg-id 3991.1519258903@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_upgrade and materialized views  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
Andres Freund <andres@anarazel.de> writes:
> Wonder if we should include a comment in the release notes that possible
> occurances of the problem can be fixed with REFRESH?

Yeah, I plan to.  I forgot to mention it in the commit message, but I
imagine it will still be fresh in mind when I make the release notes
on Friday ;-)

> I also wonder if there's a chance that this can result in wrong query
> results without getting errors, once the xids appears to be from the
> future - if so, should we ask people to refresh matviews if they're
> older than pg_upgrade?

I'm inclined to think that this is a rare problem, seeing that it's been
there more than 5 years and we just now identified it.  Probably, most
people REFRESH their matviews often enough that there aren't really
old rows in them.  (It seems to me that REFRESH CONCURRENTLY does share
part of the blame here, because it can allow older rows to linger in the
matview.)  I think it's sufficient to say "refresh if you see one of
these errors".

            regards, tom lane


pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_upgrade and materialized views
Next
From: PG Bug reporting form
Date:
Subject: BUG #15076: postmaster crashes unexpectedly when using up arrow keyin psql command