Re: Cleanup shadows variable warnings, round 1

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
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 11:55:36
Message-ID: E774D2BD-6216-47DC-AC32-B51FAEDF2095@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Mar 3, 2026, at 18:26, Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>
> Pushed 0001.

Hi Alvaro, thank you very much for pushing 0001. But I don’t see it. I tried to pull master and refresh https://git.postgresql.org/cgit/postgresql.git/log/?qt=grep&q=, none of them shows 0001 pushed.

>
> Three things about the next ones,
>
> 1. if you rename a function argument, then the function declaration
> should match the new name as well.

Sure, I will make sure that in next revision.

>
> 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.

Okay, I will try to address this.

>
> 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 ...
>

I will rename them per your suggestion, and check if there are similar things to rename.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yura Sokolov 2026-03-03 12:02:06 Re: Fix bug in multixact Oldest*MXactId initialization and access
Previous Message shveta malik 2026-03-03 11:54:14 Re: Question Regarding Publication Membership and Inheritance