From: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Gilles Darold <gilles(dot)darold(at)dalibo(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch to implement pg_current_logfile() function |
Date: | 2017-03-03 13:51:52 |
Message-ID: | 20170303075152.5c00e5cf@slate.meme.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 3 Mar 2017 15:24:53 +0900
Michael Paquier <michael(dot)paquier(at)gmail(dot)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(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2017-03-03 14:01:22 | Re: Block level parallel vacuum WIP |
Previous Message | David Steele | 2017-03-03 13:51:19 | Re: make async slave to wait for lsn to be replayed |