Re: -O switch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: -O switch
Date: 2020-11-02 17:58:00
Message-ID: 686614.1604339880@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander <magnus(at)hagander(dot)net> writes:
> PFA a patch to do this.

One thing you missed is that the getopt() calls in both postmaster.c
and postgres.c have 'o:' entries that should be removed. Also IIRC
there is a "case 'o'" in postgres.c to go along with that.

> Initially I kept the dynamic argv/argc in even though it's now
> hardcoded, in case we wanted to add something back. But given the way
> it looks now, perhaps we should just get rid of BackendRun()
> completely and directly call PostgresMain()? Or keep BackendRun() with
> just setting the TopMemoryContext, but removing the dynamic parts?

I'd be inclined to keep it as-is for now. It's not adding any significant
amount of cycles compared to the process fork, so we might as well
preserve flexibility.

Is it really possible to not include miscadmin.h in postmaster.c?
I find that a bit surprising.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2020-11-02 18:01:59 Re: Disable WAL logging to speed up data loading
Previous Message Tom Lane 2020-11-02 17:51:39 Re: Collation versioning