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

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [bug fix] pg_ctl always uses the same event source
Дата
Msg-id CAA4eK1+8fwwt_6yCvMjRLM8Q==fZfrrnQ6a-NxB7M2NLm6_Upg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [bug fix] pg_ctl always uses the same event source  ("MauMau" <maumau307@gmail.com>)
Ответы Re: [bug fix] pg_ctl always uses the same event source
Список pgsql-hackers
On Mon, Dec 9, 2013 at 2:25 AM, MauMau <maumau307@gmail.com> wrote:
> From: "Magnus Hagander" <magnus@hagander.net>
>
>> Not having looked at it in detail yet, but this seems to completely remove
>> the default value. What happens if the error that needs to be logged is
>> the
>> one saying that it couldn't exec postgres to find out the value in the
>> config file? AFAICT it's going to try to register an eventsource with
>> whatever random garbage happens to be in the variable.
>
>
> Thank you for commenting, Magnus san.
> The variable is global and contains an empty string, so even in the unlikely
> situation where postgres -C fails, the event source simply becomes blank.

1. isn't it better to handle as it is done in write_eventlog() which
means if string is empty then   use PostgreSQL.
"evtHandle = RegisterEventSource(NULL, event_source ? event_source :
"PostgreSQL");"

2. What will happen if user doesn't change the name in "event_source"
or kept the same name,   won't it hit the same problem again? So shouldn't it try to
generate different name by appending   version string to it?

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: plpgsql_check_function - rebase for 9.3
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: plpgsql_check_function - rebase for 9.3