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-02 13:46:02
Message-ID: CABUevEzYuTTDem+dQMWtA1CUC0Ame6AR7WxdtEh4PZ05Tmj29Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 29, 2020 at 5:25 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> > On Thu, Oct 29, 2020 at 4:45 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> I don't think it's really obsolete ... don't we use that to pass
> >> PGOPTIONS through from the client?
>
> > That said, I don't think we do, or I'm misunderstanding what you mean.
> > The startup packet which holds the client options is not read until
> > we're already in the child process, so there is no further exec to be
> > done?
>
> [ pokes around... ] Ah, you're right, that stuff goes through
> port->cmdline_options now. It looks like the mechanism for -o
> is the postmaster's ExtraOptions variable, which we could get
> rid of this way. Seems like a reasonable thing, especially since
> we unified all the other postmaster/postgres options already.

PFA a patch to do this.

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?

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

Attachment Content-Type Size
remove_option_o.patch text/x-patch 4.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2020-11-02 13:53:39 Re: ModifyTable overheads in generic plans
Previous Message Anastasia Lubennikova 2020-11-02 13:44:22 Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits