> On Mar 3, 2026, at 18:26, Álvaro Herrera <alvherre@kurilemu.de> wrote:
>
> 1. if you rename a function argument, then the function declaration
> should match the new name as well.
Fully addressed.
> 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.
I looked into this. There are quite a few file-scope static variables and global variables, and getting rid of them
wouldlikely require a fairly large refactoring.
For now, I worked out an approach that wraps the file-scope static variables into a structure. I moved this change to
thelast commit and marked it as WIP. I plan to spend more time on the refactoring.
In the meantime, I wonder if it would make sense to handle this refactoring in a separate patch.
>
> 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;
The progname conflicts are not caused by logging.c. Instead, it is declared in postmaster.h:
```
extern PGDLLIMPORT const char *progname;
```
I hesitate to rename this global since it is exported, and doing so might lead to additional changes elsewhere. For
now,I moved this commit to the second last one, and I may spend more time investigating it.
> 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 updated bringetbitmap to rename the outer variable.
I also went through the whole patch and tuned a few other names. Please let me know if you disagree with any of the
otherrenamings.
PFA v7. Each commit is independent, so they do not need to be pushed in the same order as in this patch.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/