From: Andres Freund <andres@anarazel.de>
To: Maxim Boguk <maxim.boguk@gmail.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Jeremy Finzel <finzelj@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Date: Tue, 22 May 2018 11:47:01 -0700
Message-ID: <20180522184701.wg2calyg65mshy5f@alap3.anarazel.de> (raw)
In-Reply-To: <CAK-MWwQEcjoD4No4-yP408+7_-4peNfJ0vYZ1LFXOyJiWtKsUw@mail.gmail.com>
References: <CAMa1XUiBhOkqFOdYj=wG6gHnKROS_CUwdTAHjPxunBFTWGHnRA@mail.gmail.com>
<CAMa1XUhX4=z5Ckq9jpDCs=q=9YP4y9pZSBNrZHO7Cncn5ZJM5Q@mail.gmail.com>
<CAH2-WznSVK-G60FYWf=5shijgqvtw1HVSkv2wzxv8AQ76s1h-g@mail.gmail.com>
<CAMa1XUj87=qmtxcP8M_ei3+r_GOKkq4vHZXd1CvFTaH6eqArjQ@mail.gmail.com>
<CAH2-WznjoRqEHcBvDeSyV=wmtw6rx3zAyg60ggj02Rg31FJF-g@mail.gmail.com>
<CAMa1XUj=3gL2+yDRzUJQbcGgsNTTk9=8ZibRwe28Ub23KoJ8aw@mail.gmail.com>
<CAH2-WznQE_R8v5RH7ZHF-J70cwV6AHZiQRwXdXqXNgc=qj3+ng@mail.gmail.com>
<CAK-MWwQUvbYNwO=u9Q9j=1uVQoKy5TuF2doHJDR1uR9i4puf7g@mail.gmail.com>
<20180522165715.oxwn4wyhv7f56asv@alap3.anarazel.de>
<CAK-MWwQEcjoD4No4-yP408+7_-4peNfJ0vYZ1LFXOyJiWtKsUw@mail.gmail.com>
Hi,
On 2018-05-22 21:30:43 +0300, Maxim Boguk wrote:
> For sample:
>
> postgres=# vacuum pg_catalog.pg_authid;
> ERROR: found xmin 2894889518 from before relfrozenxid 248712603
>
> select ctid, xmin, xmax, cmin, cmax from pg_catalog.pg_authid where
> xmin::text::bigint=2894889518;
> ctid | xmin | xmax | cmin | cmax
> --------+------------+------+------+------
> (1,26) | 2894889518 | 0 | 0 | 0
>
>
> postgres=# SELECT * FROM heap_page_items(get_raw_page('pg_authid', 1))
> where t_ctid::text='(1,26)';
> -[ RECORD 1
> ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> lp | 26
> lp_off | 4656
> lp_flags | 1
> lp_len | 144
> t_xmin | 2894889518
> t_xmax | 0
> t_field3 | 0
> t_ctid | (1,26)
> t_infomask2 | 32779
> t_infomask | 10507
> t_hoff | 32
> t_bits | 1111111111000000
> t_oid | 189787727
>
So this row has, if I didn't screw up decoding the following infomask
bits set::
HEAP_HASNULL
HEAP_HASVARWIDTH
HEAP_HASOID
HEAP_XMIN_COMMITTED
HEAP_XMAX_INVALID
HEAP_UPDATED
So it's not been previously frozen, which I was wondering about.
> Which indeed makes it
> Any new role created in DB instantly affected by this issue.
What's txid_current()?
>
> In the same time:
>
> select relfrozenxid from pg_class where relname='pg_authid';
> relfrozenxid
> --------------
> 2863429136
>
> So it's interesting where value of " from before relfrozenxid 248712603"
> come from.
Hm. That's indeed odd. Could you get a backtrace of the error with "bt
full" of the error?
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, maxim.boguk@gmail.com, pg@bowt.ie, finzelj@gmail.com, alvherre@alvh.no-ip.org
Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
In-Reply-To: <20180522184701.wg2calyg65mshy5f@alap3.anarazel.de>
References: <CAMa1XUiBhOkqFOdYj=wG6gHnKROS_CUwdTAHjPxunBFTWGHnRA@mail.gmail.com> <CAMa1XUhX4=z5Ckq9jpDCs=q=9YP4y9pZSBNrZHO7Cncn5ZJM5Q@mail.gmail.com> <CAH2-WznSVK-G60FYWf=5shijgqvtw1HVSkv2wzxv8AQ76s1h-g@mail.gmail.com> <CAMa1XUj87=qmtxcP8M_ei3+r_GOKkq4vHZXd1CvFTaH6eqArjQ@mail.gmail.com> <CAH2-WznjoRqEHcBvDeSyV=wmtw6rx3zAyg60ggj02Rg31FJF-g@mail.gmail.com> <CAMa1XUj=3gL2+yDRzUJQbcGgsNTTk9=8ZibRwe28Ub23KoJ8aw@mail.gmail.com> <CAH2-WznQE_R8v5RH7ZHF-J70cwV6AHZiQRwXdXqXNgc=qj3+ng@mail.gmail.com> <CAK-MWwQUvbYNwO=u9Q9j=1uVQoKy5TuF2doHJDR1uR9i4puf7g@mail.gmail.com> <20180522165715.oxwn4wyhv7f56asv@alap3.anarazel.de> <CAK-MWwQEcjoD4No4-yP408+7_-4peNfJ0vYZ1LFXOyJiWtKsUw@mail.gmail.com> <20180522184701.wg2calyg65mshy5f@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