| From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Remove redundant AssertVariableIsOfType uses in pg_upgrade |
| Date: | 2026-01-20 14:56:38 |
| Message-ID: | aW+XptCphbkmmNZG@ip-10-97-1-34.eu-west-3.compute.internal |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Tue, Jan 20, 2026 at 11:07:47AM +0100, Peter Eisentraut wrote:
> 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.
The changes loook good to me. All the functions where the Assert is removed
are used as arguments of upgrade_task_add_step() calls. Plus there is also
process_unicode_update() but there is no Assert to remove, so LGTM.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-01-20 14:57:26 | Re: Remove more leftovers of AIX support |
| Previous Message | Fujii Masao | 2026-01-20 14:16:08 | Re: file_fdw: Support multi-line HEADER option. |