How to _not_ save startup options in postmaster.opts?

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: How to _not_ save startup options in postmaster.opts?
Date: 2023-11-02 17:01:00
Message-ID: 89ffab7a-0dfe-42e5-ae9d-e2fff60c9762@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Pg 14, if it matters.

When doing maintenance (including a giant pg_restore), sometime one wants to
run with different configuration values (like archivemode=off,
wal_level=minimal, autovacuum=off, etc).

I could edit postgresql.conf -- or have two of them: one normal, and one for
doing maintenance -- but if I'm going to restart anyway, why not just pass
those parameters directly to the postmaster?

Alas, those config values are remembered in postmaster.opts.  But I don't
want that.

Thus: is there a way to tell pg to /not/ put those options in postmaster.opts?

Or is this my only option before restarting for production:
which postgres > $PGDATA/postmaster.opts

--
Born in Arizona, moved to Babylonia.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2023-11-02 17:24:00 Re: How to _not_ save startup options in postmaster.opts?
Previous Message Tom Lane 2023-11-02 16:08:53 Re: statement_timeout has no effect if sync standby is unavailable