Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qyb4C-009R6G-Dl for pgsql-admin@arkaria.postgresql.org; Thu, 02 Nov 2023 17:01:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qyb4A-00EDyv-6M for pgsql-admin@arkaria.postgresql.org; Thu, 02 Nov 2023 17:01:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qyb49-00EDym-Ow for pgsql-admin@lists.postgresql.org; Thu, 02 Nov 2023 17:01:09 +0000 Received: from mail-yw1-x1131.google.com ([2607:f8b0:4864:20::1131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qyb42-003dJ1-TX for pgsql-admin@lists.postgresql.org; Thu, 02 Nov 2023 17:01:08 +0000 Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-5a92782615dso14164447b3.2 for ; Thu, 02 Nov 2023 10:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698944462; x=1699549262; darn=lists.postgresql.org; h=subject:from:content-language:to:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=TRb18mSmIUzyXs7cwngpZ7MsW0ZyF1vXLYADcdvs1os=; b=Zu7jc7oAkWbYonl1weISlDXGfvReaqXq8DsPiLmWamLJtNIriv7tJGATthZFbPQ4dF J4hbaQIAkiv6VnBXH7Em09uUdA81izGIhlCmNGIjUNOc1OhzfdcwabWWb0zHEjDaX3NS lyrgdL6yQfnHTIcUCOwHQ59raiA6t/cDOCgYwFVLoacMvXlmlOqJFLLUFyh1jDYvuCGc Y4IYd2AUKFCie/DofPqcIrauH2D+fNpnFLX6PNmGEHE2SKrE1x5V2iFQ2GtMq8I2EwiW A3DRRgQsalQ1eeP1rmKvUNWsJhWv0q5HEKs2+c3dfBcXjYAxuma+95xNmpBmlurm8dPd RYMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698944462; x=1699549262; h=subject:from:content-language:to:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TRb18mSmIUzyXs7cwngpZ7MsW0ZyF1vXLYADcdvs1os=; b=NQ2GJ1oQBIz9Anw5My6H/hrOIqcvORgs/Doct/qcxvHVcA0bRP3HIlZAZdgi9fH8/J b8KnuAZ014i24lvOASklb94L5/oEOLHzLVhrgERzU9TqYU+aEJ224zpM1Iy+j26P0Bff wuZ/okEORQ0JmVa7uPgfAwsTrv+LxPBZqmboe332g3/ETQlknxPeRHJkOY2O7R37aOx5 9bmNrWjW62Gx68NMsWUsgbCW1IFE23JJt47Grwa6AzFISQNoQiGDMsigicU38FhMvf+T PF1NBB3PCza7AM2QxUddg1P4C+bKB0kc5XFdi5xOzzpoesTwFyTjLu9vyvKC7RgUrGUb RFug== X-Gm-Message-State: AOJu0YxTtHaQk9KZBL9M4UwUOrX9kJfxne7uDhNJpedkhWBb9fA2TeGN RWY/vtsS/vaDcZ7VBEcnltEM3oYJpKk= X-Google-Smtp-Source: AGHT+IGWDQOWyWf0U8LRsPjw1Mvok06mEFt04elWOOzh3o4g0vNJ/wUHpi/VxlEBt9m1zqRO2Cdnfw== X-Received: by 2002:a81:4e88:0:b0:5b3:26e1:31f0 with SMTP id c130-20020a814e88000000b005b326e131f0mr324603ywb.22.1698944461687; Thu, 02 Nov 2023 10:01:01 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810::44? ([2600:1700:bd2c:b810::44]) by smtp.googlemail.com with ESMTPSA id i128-20020a816d86000000b00583e52232f1sm1400417ywc.112.2023.11.02.10.01.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 10:01:01 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------qShAIasuOv19lwzgjMcQtjWZ" Message-ID: <89ffab7a-0dfe-42e5-ae9d-e2fff60c9762@gmail.com> Date: Thu, 2 Nov 2023 12:01:00 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Pgsql-admin Content-Language: en-US From: Ron Subject: How to _not_ save startup options in postmaster.opts? List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------qShAIasuOv19lwzgjMcQtjWZ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. --------------qShAIasuOv19lwzgjMcQtjWZ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.
--------------qShAIasuOv19lwzgjMcQtjWZ--