Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qxoWN-003coF-6p for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Oct 2023 13:11:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qxoWL-002OVl-6t for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Oct 2023 13:11:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qxoWK-002OVc-TU for pgsql-hackers@lists.postgresql.org; Tue, 31 Oct 2023 13:11:00 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qxoWI-003HzQ-Bm for pgsql-hackers@postgresql.org; Tue, 31 Oct 2023 13:10:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=mZnFl0up5veNmOA2dwdlkaFmX6IRfcoEVCTqZ65Wte4=; b=nSouO COMX2S0JBeOf18fN8bZRX/VXt3Ol8ElomRJu7DJoc19IqSMHQ6W/60MhdGJ9dgVL/ULlI9FLXo0mp ivP8SKM2nKfSrSoMABjyucTifrrfP26Y2mU530AMJerpUnf29u2XmIFXPIpRapeSBTqx/mPT65OP5 OnS9/yNHf0qAFpFss6QhBiEF5hLA5qaBCMQYokdzfrrKev8o4qQaXhGdQRdbLK6FIlEOXEijrKKzk hEJ0YOSNQM+JlKKnglJTLbbp2kkN2s5FSOJpQDrcRptvgFGmwzArXzaN1CYAm31C23XSxiwjVbvcP PfXvZNlGpLbUqxSf1ig7ExgTMbtew==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qxoWG-002gsJ-19; Tue, 31 Oct 2023 09:10:56 -0400 Date: Tue, 31 Oct 2023 09:10:56 -0400 From: Bruce Momjian To: Tom Lane Cc: Laurenz Albe , suchithjn22@gmail.com, PostgreSQL-development Subject: Re: The documentation for storage type 'plain' actually allows single byte header Message-ID: References: <167336599095.2667301.15497893107226841625@wrigleys.postgresql.org> <4977c12e127250fe9777ae57f6f5884b8f5c84ae.camel@cybertec.at> <1421365.1696027552@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Oct 21, 2023 at 09:59:04PM -0400, Bruce Momjian wrote: > On Sat, Oct 21, 2023 at 09:56:13PM -0400, Bruce Momjian wrote: > > I did some more research. It turns out that the source slot/planSlot is > > populating its pg_attribute information via makeTargetEntry() and it > > has no concept of a storage type. > > > > Digging further, I found that we cannot get rid of the the use of > > att->attstorage != TYPSTORAGE_PLAIN in macros ATT_IS_PACKABLE and > > VARLENA_ATT_IS_PACKABLE macros in src/backend/access/common/heaptuple.c > > because there are internal uses of fill_val() that can't handle packed > > varlena headers. > > > > I ended up with a doc patch that adds a C comment about this odd > > behavior and removes doc text about PLAIN storage not using packed > > headers. > > Oops, patch attached. Patch applied to all supported versions. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.