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 CAA4eK1KLR_8=eErCbk2v=w2_nQ0TErzdXAhHMCXSDO3LD4k72Q@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 Tue, Dec 17, 2013 at 5:33 PM, MauMau <maumau307@gmail.com> wrote:
> From: "Amit Kapila" <amit.kapila16@gmail.com>
>
>> Few minor things:
>
> event_source here is a global static char array, so it's automatically
> initialized with zeros and safe to access.
  Right, I had missed that point.
>
>
>> 2. minor coding style issue
>
>
> 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.
  Okay, no problem.

Few other points:
-------------------------
1.
#ifdef WIN32
/* Get event source from postgresql.conf for eventlog output */
get_config_value("event_source", event_source, sizeof(event_source));
#endif

event logging is done for both win32 and cygwin env.
under hash define (Win32 || cygwin),
so event source name should also be retrieved for both
environments. Refer below in code:

#if defined(WIN32) || defined(__CYGWIN__)
static void
write_eventlog(int level, const char *line)

2.
Docs needs to be updated for default value:
http://www.postgresql.org/docs/devel/static/event-log-registration.html
http://www.postgresql.org/docs/devel/static/runtime-config-logging.html#GUC-EVENT-SOURCE

In this patch, we are planing to change default value of event_source
from PostgreSQL to PostgreSQL 9.4 (PostgreSQL PG_MAJORVERSION)
as part of fixing the issue reported in this thread.

If anyone has objection to that, please let us know now to avoid re-work
at later stage.


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



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Logging WAL when updating hintbit
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Logging WAL when updating hintbit