Re: pg_upgrade and materialized views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Victor Yegorov <vyegorov(at)gmail(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_upgrade and materialized views
Date: 2018-02-22 00:21:43
Message-ID: 3991.1519258903@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund <andres(at)anarazel(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-02-22 01:15:50 BUG #15076: postmaster crashes unexpectedly when using up arrow key in psql command
Previous Message Andres Freund 2018-02-21 23:49:43 Re: pg_upgrade and materialized views