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 1pHCcz-0004Kh-OA for pgsql-docs@arkaria.postgresql.org; Sun, 15 Jan 2023 23:41:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pHCcy-0007i8-Li for pgsql-docs@arkaria.postgresql.org; Sun, 15 Jan 2023 23:41:28 +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 1pHCcy-0007hz-Ed for pgsql-docs@lists.postgresql.org; Sun, 15 Jan 2023 23:41:28 +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 1pHCcw-0007bH-9D for pgsql-docs@lists.postgresql.org; Sun, 15 Jan 2023 23:41:28 +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 30FNfM7N1750675; Sun, 15 Jan 2023 18:41:22 -0500 From: Tom Lane To: Andres Freund cc: Laurenz Albe , suchithjn22@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: The documentation for storage type 'plain' actually allows single byte header In-reply-to: <20230115231950.hvlzxho6pccmrn6g@awork3.anarazel.de> References: <167336599095.2667301.15497893107226841625@wrigleys.postgresql.org> <1698750.1673818827@sss.pgh.pa.us> <20230115230320.d3mtlzek6dv7mgxx@awork3.anarazel.de> <1747092.1673824101@sss.pgh.pa.us> <20230115231950.hvlzxho6pccmrn6g@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sun, 15 Jan 2023 15:19:50 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1750673.1673826082.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 15 Jan 2023 18:41:22 -0500 Message-ID: <1750674.1673826082@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2023-01-15 18:08:21 -0500, Tom Lane wrote: >> ri_newTupleSlot has the tupdesc we want, planSlot is a virtual slot >> that has the bogus tupdesc, and for some reason heap_form_tuple is >> getting called with planSlot's tupdesc not ri_newTupleSlot's. > The way we copy a slot into a heap slot is to materialize the source slo= t and > copy the heap tuple into target slot. Which is also what happened before= the > slot type abstraction (hence the problem also existing before that was > introduced). Hmm. For the case of virtual->physical slot, that doesn't sound terribly efficient. > I think it's fairly fundamental that copying between two slots assumes a > compatible tupdescs. We could possibly make some effort to inject the desired attstorage properties into the planSlot's tupdesc. Not sure where would be a good place. regards, tom lane