pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bernd Helmle <mailings@oopsware.de>
To: Magnus Hagander <magnus@hagander.net>
To: Peter Geoghegan <pg@heroku.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Cc: Marc-Olaf Jaschke <marc-olaf.jaschke@s24.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)
Date: Thu, 24 Mar 2016 15:17:27 +0100
Message-ID: <87ED026F58B14BD890EC96A6@eje.credativ.lan> (raw)
In-Reply-To: <CABUevExuD-zMEPNtUHLiXVU72iewe2zGP9PwDEsGu3FuoX4tTQ@mail.gmail.com>
References: <111D0E27-A8F3-4A84-A4E0-B0FB703863DF@s24.com>
	<9688.1458605021@sss.pgh.pa.us>
	<CA+TgmoZE6ERMy7oJWhDVz_W=siZLMBBwBp1jxiuvjrROVN7anw@mail.gmail.com>
	<CAM3SWZT04ZOVdh5j6kA4hX3kg3XLir28jsvrqT2Cxhv1QDy9kQ@mail.gmail.com>
	<CAM3SWZRKdfKhBLRXzQtMK2WACC2oo_Lq=FWAup4-xvjxkUoEbA@mail.gmail.com>
	<16214.1458615257@sss.pgh.pa.us>
	<CAM3SWZQnF3AfMwJHVdjmfmy9T2D2esX04aTfwZo2kNvwUp8OEQ@mail.gmail.com>
	<CAM3SWZTums8PyGAHUpj=3gpt-xiGbbLqUun3mKK8-aTh-z9R2A@mail.gmail.com>
	<CA+TgmoYkvRZ6BfjRj3b68p2iuwXF5auaR2DLkpFaJj+LpZZu0A@mail.gmail.com>
	<19132.1458688784@sss.pgh.pa.us>
	<20160323024445.GA1306688@tornado.leadboat.com>
	<CA+TgmoahtpvHZbtE=Gapq=HvA-N0y5qgnfMJWF0hXE9ibJGXzA@mail.gmail.com>
	<31913.1458747836@sss.pgh.pa.us>
	<1979.1458749625@sss.pgh.pa.us>
	<CA+TgmoYhbDKWh6xE4tkVY-LtcQqjByzoRtS_ecUuUd1MxGk-3A@mail.gmail.com>
	<10712.1458755212@sss.pgh.pa.us>
	<CAM3SWZSDVO_4tyDPgYX5NWFW=3BcCLpHV-vUtKKJ-VryqoKjVQ@mail.gmail.com>
	<CABUevEyk3Z1mQV=Zi-kt6gONCOw7sOKrim+XP+KMEao4rJ0Wcw@mail.gmail.com>
	<CAM3SWZSUwaPZ3fVTQaugDWucs4MJHBcYYWD726tiiQrwHaVE0g@mail.gmail.com>
	<CABUevEz09i3YpEbLkV6JXSeYZs2e-yFYh9Ui1-cT2r=K72fFBQ@mail.gmail.com>
	<CAM3SWZQdRibwD1FmYTHjqgHUsA2oacEciU0=atUAROwf5ocaSA@mail.gmail.com>
	<CABUevExXnb4b4kH0V-rnxruhmQrrLnMqApJS-vNTMZbVqVB7RQ@mail.gmail.com>
	<CAM3SWZRYSOkSeog_68B9mMac=PBJkH4dW2aee57kA0W-sFw06w@mail.gmail.com>
	<CABUevExuD-zMEPNtUHLiXVU72iewe2zGP9PwDEsGu3FuoX4tTQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>



--On 24. März 2016 14:04:22 +0100 Magnus Hagander <magnus@hagander.net>
wrote:

> That's a good question? Would it catch corruption like this? I haven't
> actually tested it :) My understanding is that the thing that can happen
> is that while we don't actually store incorrect values in the indexes, we
> can end up with index pointers in the wrong order in the indexes with
> this bug? That does sound like one of those things that the amcheck tool
> is designed to find?

This is exactly where the prototype btreecheck helped a lot. The last time
i used it to track down problems we got 

> WARNING:  page order invariant violated for index

which nailed down collation problems on that specific machine and to
identify indexes, where we got the problem.

For example, if you take the bug report from Marc-Olaf and check the
affected table/index with the current amcheck patch, you get:

bernd@localhost:test #= SELECT bt_index_check('foo_val_idx');
ERROR:  XX002: page order invariant violated for index "foo_val_idx"
DETAIL:  Lower index tid=(1,1) (points to heap tid=(0,1)) higher index
tid=(1,2) (points to heap tid=(0,2)) page lsn=0/0.
LOCATION:  bt_target_page_check, amcheck.c:687
STATEMENT:  SELECT bt_index_check('foo_val_idx');

So if you ask me, this absolutely is a "must-have".


-- 
Thanks

	Bernd


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (79+ messages)  latest in thread

Message-ID: <87ED026F58B14BD890EC96A6@eje.credativ.lan>
Permalink:  ../87ED026F58B14BD890EC96A6@eje.credativ.lan/
Also on:    postgresql.org/message-id/87ED026F58B14BD890EC96A6@eje.credativ.lan

 · 

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: mailings@oopsware.de, magnus@hagander.net, pg@heroku.com, noah@leadboat.com, marc-olaf.jaschke@s24.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)
  In-Reply-To: <87ED026F58B14BD890EC96A6@eje.credativ.lan>
  References: <111D0E27-A8F3-4A84-A4E0-B0FB703863DF@s24.com> <19132.1458688784@sss.pgh.pa.us> <20160323024445.GA1306688@tornado.leadboat.com> <CA+TgmoahtpvHZbtE=Gapq=HvA-N0y5qgnfMJWF0hXE9ibJGXzA@mail.gmail.com> <31913.1458747836@sss.pgh.pa.us> <1979.1458749625@sss.pgh.pa.us> <CA+TgmoYhbDKWh6xE4tkVY-LtcQqjByzoRtS_ecUuUd1MxGk-3A@mail.gmail.com> <10712.1458755212@sss.pgh.pa.us> <CAM3SWZSDVO_4tyDPgYX5NWFW=3BcCLpHV-vUtKKJ-VryqoKjVQ@mail.gmail.com> <CABUevEyk3Z1mQV=Zi-kt6gONCOw7sOKrim+XP+KMEao4rJ0Wcw@mail.gmail.com> <CAM3SWZSUwaPZ3fVTQaugDWucs4MJHBcYYWD726tiiQrwHaVE0g@mail.gmail.com> <CABUevEz09i3YpEbLkV6JXSeYZs2e-yFYh9Ui1-cT2r=K72fFBQ@mail.gmail.com> <CAM3SWZQdRibwD1FmYTHjqgHUsA2oacEciU0=atUAROwf5ocaSA@mail.gmail.com> <CABUevExXnb4b4kH0V-rnxruhmQrrLnMqApJS-vNTMZbVqVB7RQ@mail.gmail.com> <CAM3SWZRYSOkSeog_68B9mMac=PBJkH4dW2aee57kA0W-sFw06w@mail.gmail.com> <CABUevExuD-zMEPNtUHLiXVU72iewe2zGP9PwDEsGu3FuoX4tTQ@mail.gmail.com> <87ED026F58B14BD890EC96A6@eje.credativ.lan>

* 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