Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZeCm-0006pJ-7M for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Apr 2021 18:37:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZeCk-0000JB-NO for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Apr 2021 18:37:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZeCk-0000ID-Hd for pgsql-bugs@lists.postgresql.org; Thu, 22 Apr 2021 18:37:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZeCi-0004cF-Lz for pgsql-bugs@lists.postgresql.org; Thu, 22 Apr 2021 18:37:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 13MIbQhD1130716; Thu, 22 Apr 2021 14:37:26 -0400 From: Tom Lane To: Andres Freund cc: Amit Langote , David Steele , Pavel Biryukov <79166341370@yandex.ru>, PostgreSQL mailing lists Subject: Re: posgres 12 bug (partitioned table) In-reply-to: <20210422183148.xsopy2qsym7a7app@alap3.anarazel.de> References: <20200812162718.ycxrktzoe6rpdy5k@alap3.anarazel.de> <407111603806900@mail.yandex.ru> <793243.1619032209@sss.pgh.pa.us> <1102101.1619115665@sss.pgh.pa.us> <20210422183148.xsopy2qsym7a7app@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 22 Apr 2021 11:31:48 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1130713.1619116646.1@sss.pgh.pa.us> Date: Thu, 22 Apr 2021 14:37:26 -0400 Message-ID: <1130714.1619116646@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2021-04-22 14:21:05 -0400, Tom Lane wrote: >> (1) It seems like this is exposing a shortcoming in the >> multiple-slot-types logic. It's not hard to understand why the slot would >> look like this after execute_attr_map_slot does ExecStoreVirtualTuple, >> but if this is not a legal state for a BufferHeapTuple slot, why didn't >> ExecStoreVirtualTuple raise a complaint? > I think it's too useful to support ExecStoreVirtualTuple() in a > heap[buffer] slot to disallow that. Seems like we should make > tts_buffer_heap_getsysattr() error out if there's no tuple? OK, I could work with that. Shall we spell the error message the same as if it really were a virtual slot, or does it need to be different to avoid confusion? >> (2) It also seems like we can't use the srcSlot if we want to have >> the fail-because-its-a-virtual-tuple behavior. I experimented with >> doing ExecMaterializeSlot on the result of execute_attr_map_slot, >> and that stops the crash, but then we're returning garbage values >> of xmin etc, which does not seem good. > Garbage values as in 0's, or random data? Seems like it should be the > former? I was seeing something like xmin = 128. I think this might be from our filling in the header as though for a composite Datum. In any case, I think we need to either deliver the correct answer or throw an error; silently returning zeroes wouldn't be good. regards, tom lane