| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Remove redundant AssertVariableIsOfType uses in pg_upgrade |
| Date: | 2026-01-22 11:21:28 |
| Message-ID: | c1b79178-ab7c-461e-8359-bf400d8f1684@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 20.01.26 23:19, Nathan Bossart wrote:
> 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.
Ah, that is interesting context. Anyway, change committed.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashutosh Bapat | 2026-01-22 11:29:12 | Re: Import Statistics in postgres_fdw before resorting to sampling. |
| Previous Message | Ajay Pal | 2026-01-22 10:44:36 | Re: SQL Property Graph Queries (SQL/PGQ) |