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 1rgbEN-006zpG-TB for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Mar 2024 02:05:36 +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 1rgbEM-000BeQ-IL for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Mar 2024 02:05:35 +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 1rgbEL-000BeH-Ng for pgsql-hackers@lists.postgresql.org; Sun, 03 Mar 2024 02:05:34 +0000 Received: from m16.mail.163.com ([220.197.31.3]) by makus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rgbEF-002ZUx-8a for pgsql-hackers@lists.postgresql.org; Sun, 03 Mar 2024 02:05:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=hRr5R7OmyJ/bLAPALaHpp5DlRIUncsnuP9rBdazH2fg=; b=E2RXTnQpr/zalOCpcKBRa3ls1a2m9eExKe4PhnUQVxiS+uSGcqrfMag2x69+Ez 8o1YHjNlkIwINd6frl+iJGGidMSYUfeOQLvcrc0288g2B2ua2kpKPUUmp8EyotSi p7Zfk0IPFmuk19NhwXVhZ2dlvQKw8cFB0f+oF1bSnL2ew= Received: from 8235eee8a2a0 (unknown [140.205.118.183]) by gzga-smtp-mta-g2-1 (Coremail) with SMTP id _____wDXL3XY2uNlPrw7AA--.17036S3; Sun, 03 Mar 2024 10:05:14 +0800 (CST) References: <87il4jrk1l.fsf@163.com> <87h6jxw41k.fsf@163.com> <87sf3andy2.fsf@163.com> <87wmskm9qu.fsf@163.com> <87v87kvboq.fsf@163.com> <71321d83-391b-473b-aaf6-618c7f682b96@postgrespro.ru> <87r0i7vos3.fsf@163.com> <874je3hcwn.fsf@163.com> <8734tmg88e.fsf@163.com> <7f4c8673-4c5d-4dbf-b8e5-0ec11cd2fba0@enterprisedb.com> <87h6i2djf9.fsf@163.com> <87jzms0xza.fsf@163.com> <87frxf1gld.fsf@163.com> <871q8z19ux.fsf@163.com> User-agent: mu4e 1.10.7; emacs 29.1 From: Andy Fan To: Nikita Malakhov Cc: Tomas Vondra , Michael Zhilin , Peter Smith , vignesh C , Matthias van de Meent , pgsql-hackers@lists.postgresql.org Subject: Re: Shared detoast Datum proposal Date: Sun, 03 Mar 2024 09:52:16 +0800 In-reply-to: Message-ID: <87msrgdq93.fsf@163.com> MIME-Version: 1.0 Content-Type: text/plain X-CM-TRANSID: _____wDXL3XY2uNlPrw7AA--.17036S3 X-Coremail-Antispam: 1Uf129KBjvdXoWruw1UJw1kurWkWFWxWr1rZwb_yoWfZFb_uF 1vqr95ZFy3GFW8Cw4ayr4UAryxG3y0vr18J3W8Xa12grWUuFsxXw1kC34a9Fs3Xw4DJr98 ur1fWr43Cwsa9jkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRiEfOPUUUUU== X-Originating-IP: [140.205.118.183] X-CM-SenderInfo: x2klx3xlid0iqsrtqiywtou0bp/xtbBzx6WU2V4ICtJ5gAAst List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Nikita, > > Have you considered another one - to alter pg_detoast_datum > (actually, it would be detoast_attr function) and save > detoasted datums in the detoast context derived > from the query context? > > We have just enough information at this step to identify > the datum - toast relation id and value id, and could > keep links to these detoasted values in a, say, linked list > or hash table. Thus we would avoid altering the executor > code and all detoast-related code would reside within > the detoast source files? I think you are talking about the way Tomas provided. I am really afraid that I was thought of too self-opinionated, but I do have some concerns about this approch as I stated here [1], looks my concerns is still not addressed, or the concerns itself are too absurd which is really possible I think? [1] https://www.postgresql.org/message-id/875xyb1a6q.fsf%40163.com -- Best Regards Andy Fan