pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Johannes Graƫn <johannes@selfnet.de>
Cc: pgsql-general@postgresql.org
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: found xmin x from before relfrozenxid y
Date: Sun, 21 Oct 2018 10:24:16 -0400
Message-ID: <3266.1540131856@sss.pgh.pa.us> (raw)
In-Reply-To: <0662ea90-5249-4b8d-faa3-4abe4c88135a@selfnet.de>
References: <0662ea90-5249-4b8d-faa3-4abe4c88135a@selfnet.de>

=?UTF-8?Q?Johannes_Gra=c3=abn?= <johannes@selfnet.de> writes:
> after upgrading to version 11, I see the error pattern "found xmin x
> from before relfrozenxid y" in different databases on different hosts.
> From https://www.postgresql.org/docs/10/static/release-10-3.html, I
> learned that this was an error caused by pg_upgrade, which apparently
> had been fixed in 10.3. This page also states that refreshing the
> affected materialized view non-concurrently would fix the problem.
> My question is now how to infer the affected materialized view from the
> error message. Is there a way to tell which one to refresh from the xmin
> or relfrozenxid value?

No :-(.  I wonder why in the world we didn't make that error message
include the relation and block number the tuple was found in.

(Well, I see the short answer: the code layer throwing the error
doesn't know.  But that could be fixed easily enough.)

In the meantime, the only answer I can think of offhand is to manually
do VACUUM FREEZE on each of your MVs, and then refresh anything that
shows up with an error.

			regards, tom lane




view thread (5+ messages)  latest in thread

Message-ID: <3266.1540131856@sss.pgh.pa.us>
Permalink:  ../3266.1540131856@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3266.1540131856@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-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, johannes@selfnet.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: found xmin x from before relfrozenxid y
  In-Reply-To: <3266.1540131856@sss.pgh.pa.us>
  References: <0662ea90-5249-4b8d-faa3-4abe4c88135a@selfnet.de> <3266.1540131856@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