Re: -O switch

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: -O switch
Date: 2020-11-03 09:38:39
Message-ID: CABUevEzfnG716=-AsQ2D1axioK=cxKfRCk=wfZK9OL3p31a8Vw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 2, 2020 at 6:58 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> 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.

Ha. Of course. Oops.

PFA updated.

> > 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.

I did too, but having removed it postmaster.c still compiles fine
without warnings for me. It did also pass the cfbot build step, but it
might be that it'll eventually break down on some more different
buildfarm animal.

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

Attachment Content-Type Size
remove_option_o_2.patch text/x-patch 6.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-11-03 09:46:12 Re: Online checksums verification in the backend
Previous Message Michael Paquier 2020-11-03 09:36:50 Re: Online checksums verification in the backend