| From: | Kyle Snavely <kjsnavely(at)gmail(dot)com> |
|---|---|
| To: | Aleksander Alekseev <aleksander(at)tigerdata(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Subject: | Re: {heap,minimal}_expand_tuple() are unused |
| Date: | 2026-09-15 16:18:17 |
| Message-ID: | CAGsxED+YWYo_Y9KjGVtYzzzY7dHnYNzd7rTd1phcSvUosAu==w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello PG hackers,
I saw this Commitfest patch and thought it might be a good one for me to
begin engaging with the PG community on through review. The patch removes
`expand_tuple, heap_expand_tuple, minimal_expand_tuple, and
heap_copytuple_with_tuple`.
I went ahead and checked out the PG master branch as of commit 6e70bef. I
verified the patch contents do what is expected -- removing these functions
and updating the test comments. I verified the patch applies cleanly to
6e70bef.
```
# On master
% git grep -n -w -e expand_tuple -e heap_expand_tuple -e
minimal_expand_tuple -e heap_copytuple_with_tuple master
master:src/backend/access/common/heaptuple.c:703: *
heap_copytuple_with_tuple
master:src/backend/access/common/heaptuple.c:712:heap_copytuple_with_tuple(HeapTuple
src, HeapTuple dest)
master:src/backend/access/common/heaptuple.c:738:expand_tuple(HeapTuple
*targetHeapTuple,
master:src/backend/access/common/heaptuple.c:962:minimal_expand_tuple(HeapTuple
sourceTuple, TupleDesc tupleDesc)
master:src/backend/access/common/heaptuple.c:966: expand_tuple(NULL,
&minimalTuple, sourceTuple, tupleDesc);
master:src/backend/access/common/heaptuple.c:974:heap_expand_tuple(HeapTuple
sourceTuple, TupleDesc tupleDesc)
master:src/backend/access/common/heaptuple.c:978:
expand_tuple(&heapTuple, NULL, sourceTuple, tupleDesc);
master:src/include/access/htup_details.h:809:extern void
heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest);
master:src/include/access/htup_details.h:835:extern HeapTuple
heap_expand_tuple(HeapTuple sourceTuple, TupleDesc tupleDesc);
master:src/include/access/htup_details.h:836:extern MinimalTuple
minimal_expand_tuple(HeapTuple sourceTuple, TupleDesc tupleDesc);
master:src/test/regress/expected/fast_default.out:603:-- query to exercise
expand_tuple function
master:src/test/regress/expected/fast_default.out:639:-- in expand_tuple,
and that rows are correctly expanded for triggers
master:src/test/regress/sql/fast_default.sql:416:-- query to exercise
expand_tuple function
master:src/test/regress/sql/fast_default.sql:432:-- in expand_tuple, and
that rows are correctly expanded for triggers
# After the patch is applied
% git grep -n -w -e expand_tuple -e heap_expand_tuple -e
minimal_expand_tuple -e heap_copytuple_with_tuple review-7284
# Nothing found
```
Next I built Postgres in a Debian trixie-slim container (on ARM), with most
dependencies except docs and dtrace.
I ran a suite of tests with `meson test -C /build --print-errorlogs` which
passes.
```
Ok: 392
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 36
Timeout: 0
```
All 36 skips are suites disabled by default: 35 gated behind PG_TEST_EXTRA,
which I did not set, plus one Windows-only SSPI authentication test.
I did not encounter any issues while evaluating the patch.
Best,
Kyle
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rui Zhao | 2026-09-15 16:20:28 | Re: Support for 8-byte TOAST values, round two |
| Previous Message | Peter Geoghegan | 2026-09-15 16:01:17 | Re: Problems with get_actual_variable_range's VISITED_PAGES_LIMIT |