From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | MauMau <maumau307(at)gmail(dot)com> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [bug fix] pg_ctl always uses the same event source |
Date: | 2013-12-09 04:46:37 |
Message-ID: | CAA4eK1+8fwwt_6yCvMjRLM8Q==fZfrrnQ6a-NxB7M2NLm6_Upg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Dec 9, 2013 at 2:25 AM, MauMau <maumau307(at)gmail(dot)com> wrote:
> From: "Magnus Hagander" <magnus(at)hagander(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2013-12-09 05:24:51 | Re: plpgsql_check_function - rebase for 9.3 |
Previous Message | Amit Kapila | 2013-12-09 03:23:06 | Re: plpgsql_check_function - rebase for 9.3 |