pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rihad <rihad@mail.ru>
To: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: ERROR: found xmin 54230249 from before relfrozenxid 61349053
Date: Thu, 2 Aug 2018 18:08:49 +0400
Message-ID: <01d83080-83ef-ada4-1581-17cca5b3d9a4@mail.ru> (raw)
In-Reply-To: <8a43c0c2-8e1b-2ffa-89e1-83978db7e3cd@mail.ru>
References: <c2cd183c-97f9-770b-ebb2-a1acb78f88c0@mail.ru>
	<8a43c0c2-8e1b-2ffa-89e1-83978db7e3cd@mail.ru>

On 08/02/2018 05:34 PM, rihad wrote:
> On 08/02/2018 04:38 PM, rihad wrote:
>> Hi all. We see such errors on one of our own (non-system) tables on 
>> Postgres 10.3. They stop both automatic vacuum & automatic analyze 
>> not only on that table, but on all tables & databases (manual 
>> vacuuming works though). Luckily it's a small (but important) table - 
>> less than 1000 rows. Any quick way of fixing it with no downtime? 
>> Thanks.
>>
>
> BTW, it's a materialized view, not a table. "refresh materialized view 
> concurrently" is being run on it regularly, but apparently doesn't fix 
> the problem.
>
>
Answering to myself: this probably relates to this issue:

https://www.postgresql.org/docs/9.4/static/release-9-4-17.html

  *

    Repair pg_upgrade's failure to preserve relfrozenxid for
    materialized views (Tom Lane, Andres Freund)

    This oversight could lead to data corruption in materialized views
    after an upgrade, manifesting as "could not access status of
    transaction" or "found xmin from before relfrozenxid" errors. The
    problem would be more likely to occur in seldom-refreshed
    materialized views, or ones that were maintained only with REFRESH
    MATERIALIZED VIEW CONCURRENTLY.

    If such corruption is observed, it can be repaired by refreshing the
    materialized view (without CONCURRENTLY).


Fixed on 2018-03-01, so the bug existed not only for 9.4.17, but for all 
major versions too.

view thread (3+ messages)

Message-ID: <01d83080-83ef-ada4-1581-17cca5b3d9a4@mail.ru>
Permalink:  ../01d83080-83ef-ada4-1581-17cca5b3d9a4@mail.ru/
Also on:    postgresql.org/message-id/01d83080-83ef-ada4-1581-17cca5b3d9a4@mail.ru

 · 

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: rihad@mail.ru
  Subject: Re: ERROR: found xmin 54230249 from before relfrozenxid 61349053
  In-Reply-To: <01d83080-83ef-ada4-1581-17cca5b3d9a4@mail.ru>
  References: <c2cd183c-97f9-770b-ebb2-a1acb78f88c0@mail.ru> <8a43c0c2-8e1b-2ffa-89e1-83978db7e3cd@mail.ru> <01d83080-83ef-ada4-1581-17cca5b3d9a4@mail.ru>

* 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