Re: [bug fix] pg_ctl always uses the same event source - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [bug fix] pg_ctl always uses the same event source
Date
Msg-id CAA4eK1KLR_8=eErCbk2v=w2_nQ0TErzdXAhHMCXSDO3LD4k72Q@mail.gmail.com
Whole thread Raw
In response to Re: [bug fix] pg_ctl always uses the same event source  ("MauMau" <maumau307@gmail.com>)
Responses Re: [bug fix] pg_ctl always uses the same event source
List 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 by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Logging WAL when updating hintbit
Next
From: Michael Paquier
Date:
Subject: Re: Logging WAL when updating hintbit