Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fO1P5-0004P4-Mi for pgsql-hackers@arkaria.postgresql.org; Wed, 30 May 2018 13:44:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fO1P4-0002Le-BR for pgsql-hackers@arkaria.postgresql.org; Wed, 30 May 2018 13:44:38 +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.89) (envelope-from ) id 1fO1P4-0002LU-4O for pgsql-hackers@lists.postgresql.org; Wed, 30 May 2018 13:44:38 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fO1Ow-0000op-RI for pgsql-hackers@postgresql.org; Wed, 30 May 2018 13:44:37 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id E02C44111F; Wed, 30 May 2018 15:44:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id AzvCFKkhsRis; Wed, 30 May 2018 15:44:27 +0200 (CEST) From: Antonin Houska To: Alvaro Herrera cc: pgsql-hackers@postgresql.org Subject: Re: Incorrect visibility test function assigned to snapshot In-reply-to: <20180530132854.tkv37qiamepu3slh@alvherre.pgsql> References: <20180530132854.tkv37qiamepu3slh@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 30 May 2018 09:28:54 -0400." MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 30 May 2018 15:45:32 +0200 Message-ID: <28218.1527687932@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera wrote: > On 2018-May-30, Antonin Houska wrote: >=20 > > In the header comment, SnapBuildInitialSnapshot() claims to set > > snapshot->satisfies to the HeapTupleSatisfiesMVCC test function, and in= deed it > > converts the "xid" array to match its semantics (i.e. the xid items eve= ntually > > represent running transactions as opposed to the committed ones). Howev= er the > > test function remains HeapTupleSatisfiesHistoricMVCC as set by > > SnapBuildBuildSnapshot(). >=20 > Interesting. While this sounds like an oversight that should have > horrible consequences, it's seems not to because the current callers > don't seem to care about the ->satisfies function. Are you able to come > up with some scenario in which it causes an actual problem? Right, the current callers in the core do not seem to use that function. I = hit the issue when doing and testing some changes in an extension (pg_squeeze). --=20 Antonin Houska Cybertec Sch=C3=B6nig & Sch=C3=B6nig GmbH Gr=C3=B6hrm=C3=BChlgasse 26, A-2700 Wiener Neustadt Web: https://www.cybertec-postgresql.com