Skip site navigation (1) Skip section navigation (2)

Re: pgsql: Support configurable eventlog application names on Windows

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Support configurable eventlog application names on Windows
Date: 2011-10-25 20:40:13
Message-ID: CABUevEyA4HB=1TCFgDqZ_rM1==2vggXAaArGg6859E+EwaWGyw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-committers
On Tue, Oct 25, 2011 at 22:21, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
> On Tue, Oct 25, 2011 at 1:05 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>> Support configurable eventlog application names on Windows
>>
>> This allows different instances to use the eventlog with different
>> identifiers, by setting the event_source GUC, similar to how
>> syslog_ident works.
>>
>
> if i uncomment event_source in a linux env i get this error:
> """
> LOG:  unrecognized configuration parameter "event_source" in file
> "/usr/local/pgsql/9.2/data/postgresql.conf" line 326
> FATAL:  configuration file "/usr/local/pgsql/9.2/data/postgresql.conf"
> contains errors
> """
>
> this is because the definition of the GUC is inside an #ifdef, but the
> error message is not very informative...
> so, i tried to add a check_event_source (attached) and the error now
> looks like this
>
> """
> LOG:  22023: event_source can only be setted in windows builds
> LOCATION:  call_string_check_hook, guc.c:8172
> FATAL:  XX000: failed to initialize event_source to "PostgreSQL"
> LOCATION:  InitializeOneGUCOption, guc.c:3959
> """


Ugh, you are right. I thought I had fixed that, but it seems not. Will fix.

I think the proper fix is to just remove the #ifdef though. There's
precedent with e.g. syslog_ident, that we just ignore the setting if
it's not supported on that platform.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

pgsql-committers by date

Next:From: Magnus HaganderDate: 2011-10-25 20:41:49
Subject: pgsql: Make event_source visible on all platforms
Previous:From: Jaime CasanovaDate: 2011-10-25 20:21:51
Subject: Re: pgsql: Support configurable eventlog application names on Windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group