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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, MauMau <maumau307(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] pg_ctl always uses the same event source
Date: 2014-01-27 15:16:22
Message-ID: CAA4eK1LYPdpjqaZ=uMF8siLmOONOx--okXe78F25s4SqCK03Mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 24, 2014 at 9:10 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Fri, Jan 24, 2014 at 2:38 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Thu, Jan 23, 2014 at 9:23 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>> On Thu, Jan 23, 2014 at 10:26 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>>
>>>> I think what we might want to do is redefine the server's behavior
>>>> as creating an event named after the concatenation of event_source
>>>> and port number, or maybe even get rid of event_source entirely and
>>>> just say it's "PostgreSQL" followed by the port number.
>>>
>>> To accomplish this behaviour, each time server starts and stops,
>>> we need to register and unregister event log using mechanism
>>> described at below link to ensure that there is no mismatch between
>>> what server uses and what OS knows.
>>> http://www.postgresql.org/docs/devel/static/event-log-registration.html
>>
>> Why wouldn't that be necessary with your approach, too?
>
> Because in my approach we are using compile time constant
> + #define DEFAULT_EVENT_SOURCE
> "PostgreSQL " PG_MAJORVERSION
>
>> I mean, if
>> there's a GUC that controls the event source name, then it can be
>> changed between restarts, regardless of what you call it.
>
> Yes, but not default values (when user don't provide any value
> for event_soource). Here the question is about default value of
> event_source.

To proceed with the review of this patch, I need to know about
whether appending version number or any other constant to
Default Event Source name is acceptable or not, else for now
we can remove this part of code from patch and handle non-default
case where the change will be that pg_ctl will enquire non-default
event_source value from server.

Could you please let me know your views about same?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2014-01-27 15:23:22 Re: Add min and max execute statement time in pg_stat_statement
Previous Message Dean Rasheed 2014-01-27 15:04:45 Re: WIP patch (v2) for updatable security barrier views