Re: [Proposal] Level4 Warnings show many shadow vars

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [Proposal] Level4 Warnings show many shadow vars
Дата
Msg-id CA+Tgmoach3yBO=owjcF_O4G=V9ixeV8HcKsciijGaq5zpF3y2Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [Proposal] Level4 Warnings show many shadow vars  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [Proposal] Level4 Warnings show many shadow vars  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Dec 8, 2019 at 1:52 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Ranier Vilela <ranier_gyn@hotmail.com> writes:
> > This is the first part of the variable shadow fixes.
> > Basically it consists of renaming the variables in collision with the global ones, with the minimum change in the
semantics.
>
> I don't think I'm actually on board with the goal here.

I don't know what to do about the RedoRecPtr mess, but surely
subscriptioncmds.c's use of synchronous_commit as a char * when it's
already exists as a global variable of type int is not good practice.
We've been known to do things like reference globals from within macro
definitions, and while static inlining is likely to make that practice
less common in the future, we've got plenty of existing instances,
including one that uses that exact variable name (SyncRepRequested()).

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: [Proposal] Level4 Warnings show many shadow vars
Следующее
От: Robert Haas
Дата:
Сообщение: Re: ERROR: uncommitted xmin 347341220 from before xid cutoff967029200 needs to be frozen