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 1rSMLY-00DGQc-T3 for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jan 2024 19:22:10 +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 1rSMLY-00Fmci-0d for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jan 2024 19:22:08 +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 1rSMLW-00FmcZ-M2 for pgsql-hackers@lists.postgresql.org; Tue, 23 Jan 2024 19:22:07 +0000 Received: from m12.mail.163.com ([220.181.12.197]) by makus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rSMLO-0030fB-LO for pgsql-hackers@lists.postgresql.org; Tue, 23 Jan 2024 19:22:04 +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=fDIolLMso+r7+ESzLvc4C+7ITCaErV+GgRPkyNKyi34=; b=FU4o/aKszBgfRSoLZmTnlsZi4OXOS48vUfaOf0XjH9qS32vIy+TpVL8F/xmR9C xFVv/zHXSnb2BtuBIJ4/jbYauE1knNxxFlRuut/r0V9gR/AkezFv6m378zL35ucp UxjwwVVTnp2VSdOEyUbeV3GyxVg1AUXl+tRxSNzYdiHu4= Received: from b97369165980 (unknown [140.205.118.6]) by zwqz-smtp-mta-g3-0 (Coremail) with SMTP id _____wDnNzPMEbBliih6Bg--.36910S3; Wed, 24 Jan 2024 03:21:48 +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> User-agent: mu4e 1.10.7; emacs 29.1 From: Andy Fan To: Michael Zhilin Cc: Peter Smith , vignesh C , Matthias van de Meent , Nikita Malakhov , pgsql-hackers@lists.postgresql.org Subject: Re: Shared detoast Datum proposal Date: Wed, 24 Jan 2024 03:18:18 +0800 In-reply-to: <71321d83-391b-473b-aaf6-618c7f682b96@postgrespro.ru> Message-ID: <87r0i7vos3.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-CM-TRANSID: _____wDnNzPMEbBliih6Bg--.36910S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7uw4kKryfAF1kJr4fZryUAwb_yoW8Xw18pr WYgw40vryfJr9agrn7u347ZF109rZ5Xr1Yy3Z8G34UCr15Aw1IyFWkKF4Y9ayfC3yxua13 Jay2qryfXa1vv3JanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRp6wNUUUUU= X-Originating-IP: [140.205.118.6] X-CM-SenderInfo: x2klx3xlid0iqsrtqiywtou0bp/1tbiQBBuU2VOBM6xAwAAs+ List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain Michael Zhilin writes: > Hi Andy, > > It looks like v5 is missing in your mail. Could you please check and resend it? ha, yes.. v5 is really attached this time. commit eee0b2058f912d0d56282711c5d88bc0b1b75c2f (HEAD -> shared_detoast_value_v3) Author: yizhi.fzh Date: Tue Jan 23 13:38:34 2024 +0800 shared detoast feature. details at https://postgr.es/m/87il4jrk1l.fsf%40163.com commit eeca405f5ae87e7d4e5496de989ac7b5173bcaa9 Author: yizhi.fzh Date: Mon Jan 22 15:48:33 2024 +0800 Introduce a Bitset data struct. While Bitmapset is designed for variable-length of bits, Bitset is designed for fixed-length of bits, the fixed length must be specified at the bitset_init stage and keep unchanged at the whole lifespan. Because of this, some operations on Bitset is simpler than Bitmapset. The bitset_clear unsets all the bits but kept the allocated memory, this capacity is impossible for bit Bitmapset for some solid reasons and this is the main reason to add this data struct. Also for performance aspect, the functions for Bitset removed some unlikely checks, instead with some Asserts. [1] https://postgr.es/m/CAApHDvpdp9LyAoMXvS7iCX-t3VonQM3fTWCmhconEvORrQ%2BZYA%40mail.gmail.com [2] https://postgr.es/m/875xzqxbv5.fsf%40163.com As for the commit "Introduce a Bitset data struct.", the test coverage is 100% now. So it would be great that people can review this first. -- Best Regards Andy Fan --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=v5-0001-Introduce-a-Bitset-data-struct.patch