| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add static assertion to track the no-padding rule of varatt_exte |
| Date: | 2026-09-11 02:05:22 |
| Message-ID: | E1x4qdl-00000004NCE-2RR6@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Add static assertion to track the no-padding rule of varatt_external_oid
varatt_external_oid (varatt_external in v19 and older branches) having
no padding is a rule that has been implied for years, as pointers of
this structure may be compared using memcpy().
I doubt that anybody is going to break this rule as varatt_external is
old enough that it could vote in most countries, but this makes varatt.h
more consistent for a follow-up change that introduces a second on-disk
external TOAST pointer, and it's free to have a compile-time rule.
Suggested-by: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Discussion: https://postgr.es/m/CALj2ACVG9cjxr-0jb8PP_Vb7vJvVGBVM_fQ2srt4CpyURpfYhQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1497ea77edd2ce261670f117301dc4da33d4c894
Modified Files
--------------
src/include/varatt.h | 4 ++++
1 file changed, 4 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-09-11 03:34:19 | pgsql: Add relation option toast_value_type |
| Previous Message | Michael Paquier | 2026-09-11 01:55:40 | pgsql: Add support for TOAST chunk_id type in binary upgrades |