From: | Andy Fan <zhihuifan1213(at)163(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, David Rowley <dgrowley(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me> |
Subject: | Re: detoast datum into the given buffer as a optimization. |
Date: | 2024-10-29 06:45:58 |
Message-ID: | 874j4vcspl.fsf@163.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I find some independent improvement in this area. In the detoast_attr,
VARATT_IS_EXTERNAL_ONDISK and VARATT_IS_EXTERNAL_INDIRECT are checked
first, and then VARATT_IS_EXTERNAL_EXPANDED is checked. However when
VARATT_IS_EXTERNAL_EXPANDED is true, detoast_external_attr is called
which would check the previous two cases again. The attached patch uses
a more specific code to handle this.
This would not only remove such the double check overhead, but also make
my following patch easier since I don't need to build a
detoast_external_attr_[buffer] function.
'make check-world' passed.
--
Best Regards
Andy Fan
Attachment | Content-Type | Size |
---|---|---|
v20241029-0001-Using-more-specific-code-when-detoasting-a.patch | text/x-diff | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-10-29 06:51:11 | Re: -Wformat-signedness |
Previous Message | Peter Eisentraut | 2024-10-29 06:38:36 | Re: -Wformat-signedness |