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

From Tom Lane
Subject Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p
Date
Msg-id 19525.1084993893@sss.pgh.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
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?

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(...);
    }


            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p
Next
From: Bruce Momjian
Date:
Subject: Re: [COMMITTERS] pgsql-server/src backend/main/main.c backend/p