Re: -O switch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: -O switch
Дата
Msg-id 1983525.1604937507@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: -O switch  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: -O switch
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> On Wed, Nov 4, 2020 at 2:10 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ... looking at this again, BackendRun certainly looks ridiculously
>> over-engineered for what it still does.

> Yeah, looking at it again, I agree. PFA an updated patch, which I'll
> go ahead and push shortly.

LGTM.

> I do noticed when looking through this -- the comment before the function says:

>  * returns:
>  * Shouldn't return at all.
>  * If PostgresMain() fails, return status.

> I'm pretty sure that's incorrect in the current branches as well,
> since it's a void function it will never return anything. Pretty sure
> it should just have the first point and not the second one there, or
> is this trying to convey some meaning I'm just not getting?

Looking at old versions, BackendRun and PostgresMain used to be
declared to return int.  Whoever changed that to void evidently
missed updating this comment.

I'd reduce the whole thing to "Doesn't return."  If you were feeling
really ambitious you could start plastering pg_attribute_noreturn() on
these functions ... but since that would be placed on the declarations,
a comment here would still be in order probably.

            regards, tom lane



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

Предыдущее
От: Andreas Karlsson
Дата:
Сообщение: Re: abstract Unix-domain sockets
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: PATCH: Report libpq version and configuration