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 1fO1A4-00032M-PF for pgsql-hackers@arkaria.postgresql.org; Wed, 30 May 2018 13:29:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fO1A2-0006vf-QG for pgsql-hackers@arkaria.postgresql.org; Wed, 30 May 2018 13:29:06 +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 1fO1A2-0006ut-Gn for pgsql-hackers@lists.postgresql.org; Wed, 30 May 2018 13:29:06 +0000 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fO19u-0000UG-P8 for pgsql-hackers@postgresql.org; Wed, 30 May 2018 13:29:06 +0000 Received: by mail-qt0-x244.google.com with SMTP id h5-v6so15162756qtm.13 for ; Wed, 30 May 2018 06:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Eit7hLw5Y22oXoPjhH8tKp+1yjhihqh/JXGpn55qSs0=; b=HQPAkk0MWP859g467zxPNscYndvUmQyV2p18xO5hpBdJ+RWnkjYW3JGW6Wl+qUAyNp Td398BHsEON0tzNGk8RraxpermxHFxst8vtbeidN12doCE73e//5aCY7Wme6OCD8bz3K m1EFXZUxF3w+Ns2lpI17lXqexzXXR/0LUqsYHoUl+S7xyYOFaVaqXsbY9/+6ZQf7hJkQ TxjPKuP1MJmqG1aw4gaFLFGrxcjxKycwNWMOVHvhJ5gj1s7CQxLFwwGtM4W/e1XlE9X+ jBEZa9VRBhdAKGBHmuxUW7CqBssbNAdY7JA830oykhSik1/uky8WE1mW46ra66m3Eej9 fWxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Eit7hLw5Y22oXoPjhH8tKp+1yjhihqh/JXGpn55qSs0=; b=CmuKhWVrOStr1bKZ6XRxkdduYLiKW4WOPVajJ8DqwTUHZlzLrUpcTIzKhxn/cK7maO V+DLG1aRp10w7H4JX2//RdtrjqcVdJxf3vkZeyvleyjgAhl2xNUl/c8gMCSAOmO6Yg5Q G0qJBIzArglJ8AERgcosCut7yEI+SemZ+H2Z2OxefF6CHRz8niP7O+PACRsDDSKdsHYI joQaSSkeymaB4VTbvaD0KOrHdYeZtiebsRc6MiI1G5fTnRtjipLQtDgqd9HID6AOVtrY mTuWPPDEhASmQdoAL4hJu0/TAg6slWsoSUVBl5MNQU0HivcyLB5vCBHvy+zkxHml0n+i Oxwg== X-Gm-Message-State: APt69E17+sfh7OtNXrZ2ndhuhiPOxDuRWlLZ06eBKw6FWsW2RwLyMTLq U4yMK9fhso1Sqt85sNUAtzfqUi3P X-Google-Smtp-Source: ADUXVKLqMKgoDWB6sH3Fc97/uelNjtfjTkPnqa3ogXaX2sN8iCnGkpISqyBzVJrXJ6Sg/wcw9o3K0w== X-Received: by 2002:ac8:72ca:: with SMTP id o10-v6mr2503692qtp.409.1527686936699; Wed, 30 May 2018 06:28:56 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.57.112.31]) by smtp.gmail.com with ESMTPSA id 42-v6sm26005392qte.41.2018.05.30.06.28.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 06:28:56 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4483D842; Wed, 30 May 2018 09:28:54 -0400 (-04) Date: Wed, 30 May 2018 09:28:54 -0400 From: Alvaro Herrera To: Antonin Houska Cc: pgsql-hackers@postgresql.org Subject: Re: Incorrect visibility test function assigned to snapshot Message-ID: <20180530132854.tkv37qiamepu3slh@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <23215.1527665193@localhost> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-May-30, Antonin Houska wrote: > In the header comment, SnapBuildInitialSnapshot() claims to set > snapshot->satisfies to the HeapTupleSatisfiesMVCC test function, and indeed it > converts the "xid" array to match its semantics (i.e. the xid items eventually > represent running transactions as opposed to the committed ones). However the > test function remains HeapTupleSatisfiesHistoricMVCC as set by > SnapBuildBuildSnapshot(). 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? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services