Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebsxS-0002t1-R5 for pgsql-general@arkaria.postgresql.org; Wed, 17 Jan 2018 19:01:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebsxS-0000J1-8j for pgsql-general@arkaria.postgresql.org; Wed, 17 Jan 2018 19:01:10 +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 1ebsxS-0000Ir-13 for pgsql-general@lists.postgresql.org; Wed, 17 Jan 2018 19:01:10 +0000 Received: from winhdqexh02.eldocomp.com ([205.159.99.55] helo=exchange.eldocomp.com) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.89) (envelope-from ) id 1ebsxK-0005tX-4n for pgsql-general@lists.postgresql.org; Wed, 17 Jan 2018 19:01:09 +0000 Received: from WinHdqExh01.eldocomp.com (172.20.128.116) by WinHdqExh02.eldocomp.com (172.20.128.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 17 Jan 2018 12:00:54 -0700 Received: from WinHdqExh01.eldocomp.com ([192.168.0.10]) by WinHdqExh01.eldocomp.com ([192.168.0.10]) with mapi id 15.01.1261.035; Wed, 17 Jan 2018 12:00:54 -0700 From: Karen Stone To: Tom Lane , =?iso-8859-2?Q?Jacek_Ko=B3odziej?= CC: "pgsql-general@lists.postgresql.org" Subject: RE: READ COMMITTED vs. index-only scans Thread-Topic: READ COMMITTED vs. index-only scans Thread-Index: AQHTj5RW3C4m8NaOB0+Zpm5Zm8Xj+aN43+EA//+L5dA= Date: Wed, 17 Jan 2018 19:00:54 +0000 Message-ID: <95d1890b4a9b49f9b4236d837ee7a3dd@eldocomp.com> References: <13012.1516215374@sss.pgh.pa.us> In-Reply-To: <13012.1516215374@sss.pgh.pa.us> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.20.132.44] Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Please remove me from this list. Thanks. Karen Stone|=A0Technical Services| Eldorado=A0|a Division of MphasiS=20 5353 North 16th Street, Suite 400, Phoenix, Arizona 85016-3228=20 Tel (928) 892 5735 | www.eldoinc.com | www.mphasis.com |kstone@eldocomp.com= =20 -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20 Sent: Wednesday, January 17, 2018 11:56 AM To: Jacek Ko=B3odziej Cc: pgsql-general@lists.postgresql.org Subject: Re: READ COMMITTED vs. index-only scans =3D?UTF-8?Q?Jacek_Ko=3DC5=3D82odziej?=3D writes: > Here's what happening to me: the "A" query occasionally (in my case:=20 > on the order of tenths per day) returns an ID _higher_ than any ID=20 > present in second query's result (other conditions I haven't specified=20 > do _not_ filter any more rows than "id <=3D max ID") - as if some=20 > entries were visible for the first query, but not for the second one.=20 > This is an inconsistency that is very problematic for me. That sounds problematic to me too, but how certain are you that the "other = conditions you haven't specified" aren't suppressing the last row? That'd = certainly be the least surprising explanation. If it isn't that, though, t= his surely seems like a bug. Can you determine whether the row(s) missing in the second query are freshl= y committed? Or have they been there awhile? > Where am I wrong? What am I missing? What information may I provide to=20 > help with investigating this? Probably the best thing to spend time on would be to try to extract a publi= shable test case. It would be really hard to get to the bottom of an issue= like this without having a reproducer. It's okay if it takes awhile to re= produce the fault ... Also, before spending a whole lot of time on this: are you on 9.6.6? If not, update, just in case this is an already-fixed issue. The symptoms = don't sound familiar, but I don't want to waste a lot of time only to find = out it's some manifestation of a known bug. regards, tom lane