Re: Remove redundant AssertVariableIsOfType uses in pg_upgrade
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-01-20T22:19:22Z
Lists: pgsql-hackers
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. I think this was borrowed from logical decoding output plugins, but apparently I wrote the patch to remove these assertions from those, too (commit 30b789eafe). So, I'm not sure what I was thinking... If they are indeed redundant, I have no objection to their removal. -- nathan
Commits
-
Remove redundant AssertVariableIsOfType uses
- f3c96c9dff0c 19 (unreleased) landed
-
Remove uses of AssertVariableIsOfType() obsoleted by f2b73c8
- 30b789eafed2 16.0 cited