Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aj64u-0008UJ-2a for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Mar 2016 14:17:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aj64t-0000PL-Ll for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Mar 2016 14:17:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aj64s-0000Ng-Pj for pgsql-bugs@postgresql.org; Thu, 24 Mar 2016 14:17:34 +0000 Received: from dd6038.kasserver.com ([85.13.130.233]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aj64o-0006re-UK for pgsql-bugs@postgresql.org; Thu, 24 Mar 2016 14:17:34 +0000 Received: from [172.26.14.170] (wan3.credativ.com [94.79.138.166]) by dd6038.kasserver.com (Postfix) with ESMTPSA id 873752DC0142; Thu, 24 Mar 2016 15:17:24 +0100 (CET) Date: Thu, 24 Mar 2016 15:17:27 +0100 From: Bernd Helmle To: Magnus Hagander , Peter Geoghegan cc: Noah Misch , pgsql-bugs , Marc-Olaf Jaschke , Robert Haas , Tom Lane Subject: Re: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5) Message-ID: <87ED026F58B14BD890EC96A6@eje.credativ.lan> In-Reply-To: References: <111D0E27-A8F3-4A84-A4E0-B0FB703863DF@s24.com> <9688.1458605021@sss.pgh.pa.us> <16214.1458615257@sss.pgh.pa.us> <19132.1458688784@sss.pgh.pa.us> <20160323024445.GA1306688@tornado.leadboat.com> <31913.1458747836@sss.pgh.pa.us> <1979.1458749625@sss.pgh.pa.us> <10712.1458755212@sss.pgh.pa.us> X-Mailer: Mulberry/4.1.0a3 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; size=1317 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --On 24. M=C3=A4rz 2016 14:04:22 +0100 Magnus Hagander 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=20 > 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 #=3D SELECT bt_index_check('foo_val_idx'); ERROR: XX002: page order invariant violated for index "foo_val_idx" DETAIL: Lower index tid=3D(1,1) (points to heap tid=3D(0,1)) higher index tid=3D(1,2) (points to heap tid=3D(0,2)) page lsn=3D0/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". --=20 Thanks Bernd --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs