From: | "MauMau" <maumau307(at)gmail(dot)com> |
---|---|
To: | "Amit Kapila" <amit(dot)kapila16(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 12:22:52 |
Message-ID: | 62785992DF8649FAA795F0DD4D1AC7BC@maumau |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
From: "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com>
> 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");"
Thank you for reviewing. Yes, I did so with the first revision of this
patch (see the first mail of this thread.) I wanted to avoid duplicating
the default value in both the server and pg_ctl code. If user does not set
event_source, postgres -C returns the default value "PostgreSQL" in the
normal case, so I wanted to rely on it. I thought the second revision would
be appreciated by PostgreSQL-based products like EnterpriseDB, because there
are fewer source files to modify. But I don't mind which revision will be
adopted.
> 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?
Yes, but I assume that the user has to set his own name to identify his
instance uniquely. Even if version string is added, the same issue can
happen --- in the likely case where the user explicitly installs, for
example, PostgreSQL 9.3 as a standalone database, as well as some packaged
application that embeds PostgreSQL 9.3 which the user is unaware of.
If the user installs multiple versions of PostgreSQL explicitly with the
community installer, the installer can set event_source = 'PostgreSQL 9.3'
and 'PostgreSQL 9.4' for each instance.
Regards
MauMau
From | Date | Subject | |
---|---|---|---|
Next Message | Euler Taveira | 2013-12-09 13:03:42 | JSON decoding plugin |
Previous Message | Heikki Linnakangas | 2013-12-09 12:16:35 | Re: Recovery to backup point |