pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kamigishi Rei <iijima.yun@koumakan.jp>
To: Andres Freund <andres@anarazel.de>
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 21:36:51 +0300
Message-ID: <9c7433f6-65b3-9f57-e8a3-4414d0cf0c53@koumakan.jp> (raw)
In-Reply-To: <551936fa-9ba8-aed1-7ae1-c77d5920101c@koumakan.jp>
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>

On 29.10.2021 10:55, Kamigishi Rei wrote:
>> Do you have the log file(s) from between the 24th and now? That might 
>> give us
>> a good starting point for the LSN range to scan.
>
> There are multiple WAL log files, the first of them with the timestamp 
> of Oct 25 09:45.


The newly manifested issue is caught by pg_amcheck:

btree index "azurlane_wiki.mediawiki.page_main_title":
     ERROR:  item order invariant violated for index "page_main_title"
     DETAIL:  Lower index tid=(17,157) (points to heap tid=(540,5)) 
higher index tid=(17,158) (points to heap tid=(540,5)) page lsn=2/A019DD78.

The weird part about this is that the WAL archive does not seem to 
contain any data for 157 and 158 above (in 1663/19243/274869 blk 17). 
The last two entries are

rmgr: Btree       len (rec/tot):     53/  4885, tx:    2085600, lsn: 
2/A0195AE0, prev 2/A01943F0, desc: INSERT_LEAF off 155, blkref #0: rel 
1663/19243/274869 blk 17 FPW
rmgr: Btree       len (rec/tot):     72/    72, tx:    2085602, lsn: 
2/A019DD30, prev 2/A019DCF0, desc: INSERT_LEAF off 156, blkref #0: rel 
1663/19243/274869 blk 17

The WAL file in data14/pg_wal does not have anything related to 157 and 
158 for this filenode/blk as well.

-- 
K. R.






view thread (103+ messages)  latest in thread

Message-ID: <9c7433f6-65b3-9f57-e8a3-4414d0cf0c53@koumakan.jp>
Permalink:  ../9c7433f6-65b3-9f57-e8a3-4414d0cf0c53@koumakan.jp/
Also on:    postgresql.org/message-id/9c7433f6-65b3-9f57-e8a3-4414d0cf0c53@koumakan.jp

 · 

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-bugs@postgresql.org
  Cc: iijima.yun@koumakan.jp, andres@anarazel.de, 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: <9c7433f6-65b3-9f57-e8a3-4414d0cf0c53@koumakan.jp>
  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>

* 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