Kyotaro HORIGUCHI <horiguchi.kyot...@lab.ntt.co.jp> writes:
>> I noticed that exit_hook_registered variable in start_postmaster() is
>> local variable. Shouldn't it be a static variable?
> Good catch! It is totally useless unless being static.
> But I think it is not necessary to go outside
> start_postmaster. Just being static staying in start_postmaster
> is enough.
I agree, since there's no need for any other function to touch it.
But personally I'd want to visually separate the static variable
from the non-static ones. So maybe like this:
char cmd[MAXPGPATH * 4 + 1000];
- bool exit_hook_registered = false;
bool pg_ctl_return = false;
char socket_string[MAXPGPATH + 200];
+ static bool exit_hook_registered = false;
Will push it in a bit.
regards, tom lane
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: