Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p
Дата
Msg-id 200405191939.i4JJd5w11094@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > OK, I moved the find_my_exec calls to the locations you mentioned in
> > both postgres.c and postmaster.c and remove it from main.c.  I tested
> > the elog and it worked.
>
> You omitted get_pkglib_path() from the postmaster case; was that
> intentional?

Got it later.  Thanks.

> Also, in the non-exec case it seems unnecessary and possibly unsafe to
> repeat this computation in a backend.  It should inherit the settings
> from the postmaster via fork(), I'd think.  So possibly
>
> #ifndef EXEC_BACKEND
>     if (!IsUnderPostmaster)
> #endif
>     {
>         find_my_exec(...);
>         get_pkglib_path(...);
>     }

Thanks.  It originally was as below and I forgot about that.  It now is:

    if (my_exec_path[0] == '\0' && find_my_exec(argv[0], my_exec_path) < 0)

The issue is that fork/exec will need to set it too.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p