Re: Error on vacuum: xmin before relfrozenxid - Mailing list pgsql-general

From Andres Freund
Subject Re: Error on vacuum: xmin before relfrozenxid
Date
Msg-id 20180522211937.bfotr476fkn3rav6@alap3.anarazel.de
Whole thread Raw
In response to Re: Error on vacuum: xmin before relfrozenxid  (Paolo Crosato <paolo.crosato@gmail.com>)
Responses Re: Error on vacuum: xmin before relfrozenxid
Re: Error on vacuum: xmin before relfrozenxid
List pgsql-general
Hi,

On 2018-05-22 21:43:01 +0200, Paolo Crosato wrote:
> > Could you report the result of
> > select ctid, xmin, xmax from pg_authid ;
> >
> 
> This is the result:
> 
> postgres=# select ctid, xmin, xmax from pg_authid ;

>  (0,16) | 3031994631 |    0
>  16 |   6496 |        1 |    144 | 3031994631 |      0 |        0 | (0,16)
> |       32779 |      10507 |     32 | 1111111111000000 |  675851 |
>
\x6e6167696f73000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000001000000ffffffff496d64356333633236616163636439616665346437383061396239613464663634653639

> postgres=# select relfrozenxid from pg_class where relname='pg_authid';
>  relfrozenxid
> --------------
>     400011439

That tuple looks, to me, like it indeed shouldn't exist, given the
relfrozenxid.  Decoding infomask (10507 / 0x290B), if I did it right,
shows:

HEAP_HASNULL
HEAP_HASVARWIDTH
HEAP_HASOID
HEAP_XMIN_COMMITTED
HEAP_XMAX_INVALID
HEAP_UPDATED

so it's not frozen.  That suggests there's either a bug, or you had
corruption in your cluster.


Could you give a bit of "history" about that postgres instance? What
version of postgres was it run on earliest? Was it ever pg_upgraded?
Were there any OS crashes? Other hardware issues?  Was the cluster ever
used with fsync=off or full_page_writes=off?

Greetings,

Andres Freund


pgsql-general by date:

Previous
From: Stuart McGraw
Date:
Subject: Re: source of connection fails at pg startup?
Next
From: Paolo Crosato
Date:
Subject: Re: Error on vacuum: xmin before relfrozenxid