Re: [bug fix] pg_ctl always uses the same event source

Поиск
Список
Период
Сортировка
От MauMau
Тема Re: [bug fix] pg_ctl always uses the same event source
Дата
Msg-id D952BB44B71341A9B8FCB8E09E5CA108@maumau
обсуждение исходный текст
Ответ на Re: [bug fix] pg_ctl always uses the same event source  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: [bug fix] pg_ctl always uses the same event source
Список pgsql-hackers
From: "Amit Kapila" <amit.kapila16@gmail.com>
> Few minor things:
> 1.
> evtHandle = RegisterEventSource(NULL,
> *event_source? event_source: DEFAULT_EVENT_SOURCE);
>
> In this code, you are trying to access the value (*event_source) and
> incase it is not initialised,
> it will not contain the value and could cause problem, why not
> directly check 'event_source'?

event_source here is a global static char array, so it's automatically
initialized with zeros and safe to access.


> 2. minor coding style issue
> pg_ctl.c
> evtHandle = RegisterEventSource(NULL,
> *event_source? event_source: DEFAULT_EVENT_SOURCE);
>
> elog.c
> ! evtHandle = RegisterEventSource(NULL,
> ! event_source ? event_source : DEFAULT_EVENT_SOURCE);
>
> In both above usages, it is better that arguments in second line should
> start
> inline with previous lines first argument. You can refer other places,
> for ex. refer call to ReportEvent in pg_ctl.c just below
> RegisterEventSource call.

Thanks.  I passed the source files through pgindent and attached the revised
patch.  Although the arguments in the second line are not in line with the
first line's arguments, that's what pgindent found good.

Regards
MauMau

Вложения

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

Предыдущее
От: KONDO Mitsumasa
Дата:
Сообщение: Re: Optimize kernel readahead using buffer access strategy
Следующее
От: "MauMau"
Дата:
Сообщение: [bug fix] connection service file doesn't take effect with ECPG apps