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 CAA4eK1LYPdpjqaZ=uMF8siLmOONOx--okXe78F25s4SqCK03Mw@mail.gmail.com
Whole thread Raw
In response to Re: [bug fix] pg_ctl always uses the same event source  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: [bug fix] pg_ctl always uses the same event source  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jan 24, 2014 at 9:10 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Fri, Jan 24, 2014 at 2:38 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Thu, Jan 23, 2014 at 9:23 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>>> On Thu, Jan 23, 2014 at 10:26 AM, Tom Lane <tgl@sss.pgh.pa.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



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: WIP patch (v2) for updatable security barrier views
Next
From: Andrew Dunstan
Date:
Subject: Re: Add min and max execute statement time in pg_stat_statement