Re: [Proposal] Level4 Warnings show many shadow vars
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, ranier_gyn@hotmail.com,
pgsql-hackers@postgresql.org
Date: 2019-12-09T22:11:10Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes: > We have a not-consistently-used convention that names in CamelCase are > used for global variables. Naming a function parameter in that style > seems pointlessly confusing. I would rather use redorecptr as Tom > suggested, which fits with the style used for the other arguments of > that function. BTW prepending an X or a p looks like minimum effort... > I'd stay away from that. Actually, for the particular case of RemoveXlogFile(s), I wonder if it shouldn't be "startptr" to go with the other argument "endptr". This line of thinking might not lead to nicer names in other functions, of course. But we shouldn't assume that a one-size-fits-all solution is going to improve legibility, and in the end, legibility is what this should be about. regards, tom lane
Commits
-
Remove shadow variables linked to RedoRecPtr in xlog.c
- 668365014d7b 11.7 landed
- 35c01529b8c9 12.2 landed
- 70116493a8e0 13.0 landed
-
Fix calculation for WAL segment recycling and removal
- d9fadbf13103 12.0 cited