Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlJ0U-0002Jy-9f for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Jul 2019 20:16:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hlJ0S-0005gc-SL for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Jul 2019 20:16:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlJ0R-0005Zw-0U for pgsql-bugs@lists.postgresql.org; Wed, 10 Jul 2019 20:16:00 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlJ0J-00075M-Nt for pgsql-bugs@lists.postgresql.org; Wed, 10 Jul 2019 20:15:57 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 85A9121F85; Wed, 10 Jul 2019 16:15:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 10 Jul 2019 16:15:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=WUZnDM4YMZwefh+wpJREHr/VJVb PUVF7EZbd1RHRsA8=; b=Ppvs+9QsZe2B0kbxrHjHHNu1rWR/0AOd45PhANqcGVS Ls2n4+eKbeBO71UitiKfmngI9aKDjCbUNunYsZuzSYXQyAkrM36SqqctBMgdqYY/ JViTQUsC467dXVclZNz8Bt3JH0PTTsDAKwKQ3H/c76+TQU1Y+qkL66xv3LKsQ7vB zPvQv3n25y1ho72sNP0fWP0ZZ9Qx9x3R5YshueqCxHyOvgqiwIl4fKx19+oXx5WP xT5yn4+15ZHMi2WtmeAB3Xrqx2SqIWLo6UWf3bPxj9lMyBDmU7aRhVSCEhLaU0lh xlQmpKKAVtUGqTgU/wOmMqdNAq7cwwzhS8Di4NcE0bw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=WUZnDM 4YMZwefh+wpJREHr/VJVbPUVF7EZbd1RHRsA8=; b=J4hHcLDmDu2CC5YmwNcjkB 7irkU9OJgJm40I1EOgVGLEMyrneX1wzmgDXb11wUZ/ttrs1YRRYBNSkQ8+Jco5Op BX5kbZkXMqD64eZI55VP3YzLVmSaWl57kjugsuvZ35MzIcVhk1LdSenMr8R37Ooa IsfM9GQmsTfQ9THyXgoaw3ZY+fijbPH/+ckUbsT9sbrxDnYgJRaEHUbN5xcdyCrR 19TYOJrKQMD8MN24U/H+QDLxsMja6zwKlE+i1QBM8rvk+KC71FlwuRc1fUqZg9o9 ez7F23hFNbob2NsHOC3DOBuaTbN7YiPpDYO7R3mUe4dakaRUvkurB3s0H1UPj7Xw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrgeeigddugeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucfkphepie ejrdduiedtrddvudekrddvfeejnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgv shesrghnrghrrgiivghlrdguvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-218-237.hsd1.ca.comcast.net [67.160.218.237]) by mail.messagingengine.com (Postfix) with ESMTPA id D4BA98005A; Wed, 10 Jul 2019 16:15:48 -0400 (EDT) Date: Wed, 10 Jul 2019 13:15:47 -0700 From: Andres Freund To: Tom Lane Cc: Peter Geoghegan , Manuel Rigger , PostgreSQL mailing lists Subject: Re: ERROR: found unexpected null value in index Message-ID: <20190710201547.l6vs6y3cf2tuac73@alap3.anarazel.de> References: <9288.1562720919@sss.pgh.pa.us> <20825.1562723034@sss.pgh.pa.us> <8251.1562726821@sss.pgh.pa.us> <12489.1562788970@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12489.1562788970@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-07-10 16:02:50 -0400, Tom Lane wrote: > A bigger problem with this is that in the tableam world, this seems > like a complete disaster modularity-wise. I think it won't actually > fail --- non-heap AMs are probably not returning > BufferHeapTupleTableSlots, and even if they are, they shouldn't be > marking tuples HOT_UPDATED unless that concept applies to them. > But it sure seems like this leaves get_actual_variable_range() knowing > way more than it ought to about storage-level concerns. Yea, I think that's not pretty. I'm not concerned about wrong results due to BufferHeapTupleTableSlots being returned, and misinterpreted, but layering wise this seems not good. Even leaving tableam aside, it seems not nice to have this concern leak into selfuncs.c > Should we try to transpose some of this logic to below the AM API, > and if so, what should that look like? I wonder if we could push this down into a separate type of visibility (or maybe redefine NonVacuumable)? So that the scan wouldn't ever return them in the first place? It's a bit annoying to have a visibility type that's perhaps best called "what selfuncs.c needs", but still seams cleaner than having a separate callback? And the explanation for why that's possibly needed also seems to better belong inside the AMs. - Andres