From: Andres Freund <andres@anarazel.de>
To: Paolo Crosato <paolo.crosato@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: Error on vacuum: xmin before relfrozenxid
Date: Tue, 22 May 2018 14:19:37 -0700
Message-ID: <20180522211937.bfotr476fkn3rav6@alap3.anarazel.de> (raw)
In-Reply-To: <CAKMFJufB73W04jTYUVEdUgcsicW6F_wUrAv-dgWxinSoCTLBdw@mail.gmail.com>
References: <CAKMFJucqbuoDRfxPDX39WhA3vJyxweRg_zDVXzncr6+5wOguWA@mail.gmail.com>
<20180522164911.lczs6qsod23tx6eb@alap3.anarazel.de>
<CAKMFJufB73W04jTYUVEdUgcsicW6F_wUrAv-dgWxinSoCTLBdw@mail.gmail.com>
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
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: andres@anarazel.de, paolo.crosato@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: Error on vacuum: xmin before relfrozenxid
In-Reply-To: <20180522211937.bfotr476fkn3rav6@alap3.anarazel.de>
References: <CAKMFJucqbuoDRfxPDX39WhA3vJyxweRg_zDVXzncr6+5wOguWA@mail.gmail.com> <20180522164911.lczs6qsod23tx6eb@alap3.anarazel.de> <CAKMFJufB73W04jTYUVEdUgcsicW6F_wUrAv-dgWxinSoCTLBdw@mail.gmail.com> <20180522211937.bfotr476fkn3rav6@alap3.anarazel.de>
* 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