pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Victor Yegorov <vyegorov@gmail.com>
Cc: Claudio Freire <klaussfreire@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_upgrade and materialized views
Date: Wed, 21 Feb 2018 19:21:43 -0500
Message-ID: <3991.1519258903@sss.pgh.pa.us> (raw)
In-Reply-To: <20180221234943.xagxfgvjkrrs4c3o@alap3.anarazel.de>
References: <CAGTBQpbrY9CdRGGhyBZ9yqY4jWaGC85rUF4X+R7d-aim=mBNsw@mail.gmail.com>
	<23575.1519162064@sss.pgh.pa.us>
	<CAGTBQpY0wu1UiPUMjDCTrxaR92EETXBqo0+fPDGeBbg-v64J7A@mail.gmail.com>
	<24838.1519163208@sss.pgh.pa.us>
	<CAGTBQpZHSPXNZh-DY319FVuuz3o1c-fH-Dkc9R656MOP0AgcPw@mail.gmail.com>
	<CAGTBQpZ2-7hBs0T+JRFWqzvW_qqo=Qe+oYivnM1OPZGp2z0KOQ@mail.gmail.com>
	<CAGnEboipw-MY+beePKfhYO9c+Vqi_c44n-Fhr+2vN4H5VDHMnw@mail.gmail.com>
	<8092.1519225692@sss.pgh.pa.us>
	<20180221173344.wjp4r6lxhcm35pzv@alap3.anarazel.de>
	<1695.1519256726@sss.pgh.pa.us>
	<20180221234943.xagxfgvjkrrs4c3o@alap3.anarazel.de>

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




view thread (31+ messages)  latest in thread

Message-ID: <3991.1519258903@sss.pgh.pa.us>
Permalink:  ../3991.1519258903@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3991.1519258903@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, vyegorov@gmail.com, klaussfreire@gmail.com
  Subject: Re: pg_upgrade and materialized views
  In-Reply-To: <3991.1519258903@sss.pgh.pa.us>
  References: <CAGTBQpbrY9CdRGGhyBZ9yqY4jWaGC85rUF4X+R7d-aim=mBNsw@mail.gmail.com> <23575.1519162064@sss.pgh.pa.us> <CAGTBQpY0wu1UiPUMjDCTrxaR92EETXBqo0+fPDGeBbg-v64J7A@mail.gmail.com> <24838.1519163208@sss.pgh.pa.us> <CAGTBQpZHSPXNZh-DY319FVuuz3o1c-fH-Dkc9R656MOP0AgcPw@mail.gmail.com> <CAGTBQpZ2-7hBs0T+JRFWqzvW_qqo=Qe+oYivnM1OPZGp2z0KOQ@mail.gmail.com> <CAGnEboipw-MY+beePKfhYO9c+Vqi_c44n-Fhr+2vN4H5VDHMnw@mail.gmail.com> <8092.1519225692@sss.pgh.pa.us> <20180221173344.wjp4r6lxhcm35pzv@alap3.anarazel.de> <1695.1519256726@sss.pgh.pa.us> <20180221234943.xagxfgvjkrrs4c3o@alap3.anarazel.de> <3991.1519258903@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox