Re: Cleanup shadows variable warnings, round 1

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>
Subject: Re: Cleanup shadows variable warnings, round 1
Date: 2026-03-03 10:26:32
Message-ID: 202603031015.s6lmrgi7x67r@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pushed 0001.

Three things about the next ones,

1. if you rename a function argument, then the function declaration
should match the new name as well.

2. xlogrecovery.c has far too many global variables. Can we use this
opportunity to try to get rid of some of them? Especially one called
"xlogreader" is I think quite bug-prone.

3. I disagree with some of the choices made; for instance rather than
rename the local "progname" variables in all those places, I would
rename the global to logging_progname in logging.c; in bringetbitmap
(0002) I would rename the outer "tmp" to "sizecheck" or something like
that. I guess this is mostly matter of mostly arbitrary judgment ...

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lukas Fittl 2026-03-03 10:29:06 Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?
Previous Message Amit Kapila 2026-03-03 10:25:27 Re: Fix slotsync worker busy loop causing repeated log messages