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

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [bug fix] pg_ctl always uses the same event source
Дата
Msg-id CAA4eK1KAm-T6imERrt-pVvb=mLAjhbChNZQ+2cJH8CQEtG+1yw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [bug fix] pg_ctl always uses the same event source  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [bug fix] pg_ctl always uses the same event source  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, Apr 5, 2014 at 4:58 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "MauMau" <maumau307@gmail.com> writes:
>> [ pg_ctl_eventsrc_v6.patch ]
>
> I looked at this patch a bit.  As a non-Windows person I have no intention
> of being the committer, since I can't test the Windows-specific changes.
> However, I do want to object to the business about having pg_ctl use
> "postgres -C" to try to determine the event source name to use.  The code
> that you repurposed was okay for its original use, namely finding out
> where a config directory would point the data directory to, but I don't
> think it's up to snuff for identifying the value of event_source that a
> running server is using.  The actual value might have been set from a
> command line option for instance.

Are you concerned about the case when user passes event_source name
in command line at the time of start:
pg_ctl start -o "-c event_source=PG9.4" -D <data_dir>

If my understanding is right about your concern, then I think it will consider
the above case even when passed in command line. Example
postgres.exe -C event_source -c event_source=PG9.4 -D <data_dir>
PG9.4

> Moreover, the whole thing seems rather
> circular since what pg_ctl wants the event source name for is to report
> errors.  What if it fails to get the event source name, or needs to
> report an error before the (rather late) point at which it even tries
> to get it?

In that case, it will use Default Event Source name PostgreSQL which
is same what server also does in case it gets error before processing
of event source config. For Example if we get any error in check_root()
function, it will use Default Event Source name.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Fwd: Proposal: variant of regclass
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: [PATCH] Negative Transition Aggregate Functions (WIP)