From: Andres Freund <andres@anarazel.de>
To: Kamigishi Rei <iijima.yun@koumakan.jp>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Subject: Re: BUG #17245: Index corruption involving deduplicated entries
Date: Fri, 29 Oct 2021 13:59:09 -0700
Message-ID: <20211029205909.ycbqxtz75srf75lu@alap3.anarazel.de> (raw)
In-Reply-To: <20211029204945.6hzta5dmxwtikurx@alap3.anarazel.de>
References: <202110250104.jve5vzdedck7@alvherre.pgsql>
<87h7d57b3q.fsf@news-spur.riddles.org.uk>
<20211028214209.kbv4ulehz36up6kq@alap3.anarazel.de>
<125603c4-4403-dcbb-221e-fd1d4ef6ed83@koumakan.jp>
<20211028220124.n4vulzxp6i6fsq4t@alap3.anarazel.de>
<551936fa-9ba8-aed1-7ae1-c77d5920101c@koumakan.jp>
<9c7433f6-65b3-9f57-e8a3-4414d0cf0c53@koumakan.jp>
<399affa1-c9c5-9b3e-c14f-b24ecb86b303@koumakan.jp>
<20211029204945.6hzta5dmxwtikurx@alap3.anarazel.de>
Hi,
On 2021-10-29 13:49:45 -0700, Andres Freund wrote:
> > rmgr: Heap len (rec/tot): 54/ 54, tx: 2014291, lsn:
> > 2/8DEC0460, prev 2/8DEC0420, desc: LOCK off 53: xid 2014291: flags 0x00
> > LOCK_ONLY EXCL_LOCK , blkref #0: rel 1663/19243/19560 blk 540
> > rmgr: Heap len (rec/tot): 82/ 82, tx: 2014291, lsn:
> > 2/8DEC0498, prev 2/8DEC0460, desc: HOT_UPDATE off 53 xmax 2014291 flags 0x60
> > ; new off 41 xmax 2014291, blkref #0: rel 1663/19243/19560 blk 540
>
> HOT of 540,53, now at 540,41.
>
> Here I am confused. 540,41 was presumably marked dead in 2/8DEC0420, but not
> marked unused? So this shouldn't be possible.
>
> What am I missing?
Oh. Likely the issue is that heap2_desc() doesn't print the number of
redirects.
I'm considering writing a patch that
1) displays the number of tuples marked unused in HEAP2_PRUNE. This might only
be possible if no FPW was used
2) if a HEAP2_PRUNE or HEAP2_VACUUM isn't an FPW, display the offsets
For 15 I think it might be worth to explicitly store the number of offets
marked unused, rather than inferring that. It's hard to believe that the 16
bit for that would be a relevant overhead, and having that more readily
available seems like a significant improvement in debuggability.
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-bugs@postgresql.org
Cc: andres@anarazel.de, iijima.yun@koumakan.jp, andrew@tao11.riddles.org.uk, alvherre@alvh.no-ip.org, pg@bowt.ie, thomas.munro@gmail.com
Subject: Re: BUG #17245: Index corruption involving deduplicated entries
In-Reply-To: <20211029205909.ycbqxtz75srf75lu@alap3.anarazel.de>
References: <202110250104.jve5vzdedck7@alvherre.pgsql> <87h7d57b3q.fsf@news-spur.riddles.org.uk> <20211028214209.kbv4ulehz36up6kq@alap3.anarazel.de> <125603c4-4403-dcbb-221e-fd1d4ef6ed83@koumakan.jp> <20211028220124.n4vulzxp6i6fsq4t@alap3.anarazel.de> <551936fa-9ba8-aed1-7ae1-c77d5920101c@koumakan.jp> <9c7433f6-65b3-9f57-e8a3-4414d0cf0c53@koumakan.jp> <399affa1-c9c5-9b3e-c14f-b24ecb86b303@koumakan.jp> <20211029204945.6hzta5dmxwtikurx@alap3.anarazel.de> <20211029205909.ycbqxtz75srf75lu@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