| From: | Denis Rodionov <denis(dot)rodionov(at)tantorlabs(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | [PATCH] Remove obsolete tupDesc assignment in extended statistics |
| Date: | 2026-05-28 15:58:39 |
| Message-ID: | 4cb9e2ae-9ac4-4e2d-a840-c4accb9d105d@tantorlabs.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi hackers,
Attached is a small cleanup patch for extended statistics.
lookup_var_attr_stats() assigns tupDesc to VacAttrStats entries created
for expressions. That appears to be obsolete: make_build_data() uses
tupDesc only when fetching values for regular columns, while expressions
are handled separately using VacAttrStats entries created by
examine_expression().
The old comment also points at statext_mcv_build(), but this does not
seem to match the current code anymore. If some future code needs a
tuple descriptor for expression entries here, it should probably set up
that dependency explicitly rather than rely on copying vacatts[0]->tupDesc.
The patch removes the assignment and the outdated XXX comment.
Best regards,
Denis Rodionov
Tantor Labs LLC,
https://tantorlabs.com/
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Remove-obsolete-tupDesc-assignment-in-extended-st.patch | text/x-patch | 1.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2026-05-28 16:07:08 | Make memory checking / sanitizing infrastructure better |
| Previous Message | Jacob Champion | 2026-05-28 15:51:09 | Re: Heads Up: cirrus-ci is shutting down June 1st |