| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Remove redundant AssertVariableIsOfType uses in pg_upgrade |
| Date: | 2026-01-20 10:07:47 |
| Message-ID: | 3d289481-7f76-409f-81c7-81824219cc75@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
pg_upgrade code contains a number of lines like
AssertVariableIsOfType(&process_rel_infos, UpgradeTaskProcessCB);
This is presumably to ensure that the function signature is fitting for
being used with upgrade_task_add_step(). But the signature of
upgrade_task_add_step() already checks that itself, so these additional
assertions are redundant, and I find them confusing. So I propose to
remove them.
In the original thread
<https://www.postgresql.org/message-id/flat/20240516211638.GA1688936%40nathanxps13>
I found that this pattern was introduced between patch versions v9 and
v10, but there was no further explanation.
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Remove-redundant-AssertVariableIsOfType-uses.patch | text/plain | 5.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | VASUKI M | 2026-01-20 10:24:48 | Optional skipping of unchanged relations during ANALYZE? |
| Previous Message | Tatsuro Yamada | 2026-01-20 10:01:04 | Re: [PATCH] psql: add \dcs to list all constraints |