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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, 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-23 03:27:17
Message-ID: CAA4eK1LTnNgKhVnScroSkr22Pz1C3GaFYVP_xQL_8Do6HRFyZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 22, 2014 at 9:03 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
>> On Wed, Jan 22, 2014 at 6:54 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> I wonder if the port number wouldn't be a better choice. And that
>>> could even be done without adding a parameter.
>
>> We need this for register of event source which might be done before
>> start of server.
>
> So? Anything which can know the value of a GUC parameter can certainly
> know the selected port number.

1. In case of registration of event source, either user has to pass the name
or it uses hard coded default value, so if we use version number along with
'PostgreSQL', it can be consistent.
I don't see any way pgevent.c can know port number to append it to default
value, am I missing something here?
2. In pg_ctl if we use port number, then if user changes it across multiple
server restarts, then it can also create a problem, as the event source
name used will be different than what the name used during registration
of event source.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-01-23 03:30:14 Re: Confusing documentation of ordered-set aggregates?
Previous Message Andrew Dunstan 2014-01-23 03:00:06 Re: Add min and max execute statement time in pg_stat_statement