Re: [HACKERS] Patch to implement pg_current_logfile() function

Поиск
Список
Период
Сортировка
От Karl O. Pinc
Тема Re: [HACKERS] Patch to implement pg_current_logfile() function
Дата
Msg-id 20170303075152.5c00e5cf@slate.meme.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Patch to implement pg_current_logfile() function  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [HACKERS] Patch to implement pg_current_logfile() function  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Fri, 3 Mar 2017 15:24:53 +0900
Michael Paquier <michael.paquier@gmail.com> wrote:
> 
> +           /*
> +            * No space found, file content is corrupted.  Return
> NULL to the
> +            * caller and inform him on the situation.
> +            */
> +           elog(ERROR,
> +                "missing space character in \"%s\"",
> LOG_METAINFO_DATAFILE);
> +           break;
> There is no need to issue a break after a elog(ERROR).

There's 2 cases of issuing a break after a elog(ERROR),
both in the same loop.

And the comment could then be amended as well to just:
 No space found, file content is corrupted

Because (I presume) there's no returning of any value
going on.

But if the code does not exit the loop then
before calling elog(ERROR), shouldn't it
also call FreeFile(fd)?

Regards,

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."                -- Robert A. Heinlein



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

Предыдущее
От: David Steele
Дата:
Сообщение: Re: [HACKERS] make async slave to wait for lsn to be replayed
Следующее
От: David Steele
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum WIP