pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Bossart, Nathan <bossartn@amazon.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Mark Dilger <mark.dilger@enterprisedb.com>
Cc: Don Seiler <don@seiler.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Estimating HugePages Requirements?
Date: Tue, 10 May 2022 09:12:49 -0700
Message-ID: <20220510161249.GA3715618@nathanxps13> (raw)
In-Reply-To: <Yni6ZHkGotUU+RSf@paquier.xyz>
References: <20220315224439.GA1133771@nathanxps13>
	<Yjq9bJe28newGZaK@paquier.xyz>
	<CABUevEyExSDrtZ4wU19iX4yvgExR1EpjFKB4ExFQDgTAvAHFyg@mail.gmail.com>
	<Yl8z169DzkSjdZFV@paquier.xyz>
	<CABUevEwPPxR-SD55UWDLZuLa2UVGY+OQpVPPvO82X10MU_hLcA@mail.gmail.com>
	<YmXoIEaR2CWRV7KP@paquier.xyz>
	<CABUevEyD_aLM=oXi1jj8hRN=7aJq--jN4FP+ehY8Vu60+QH61A@mail.gmail.com>
	<YmdMDiCCyVJLlB/F@paquier.xyz>
	<20220506171318.GA3448558@nathanxps13>
	<Yni6ZHkGotUU+RSf@paquier.xyz>

On Mon, May 09, 2022 at 03:53:24PM +0900, Michael Paquier wrote:
> I have looked at the patch posted at [1], and I don't quite understand
> why you need the extra dance with log_min_messages.  Why don't you
> just set the GUC at the end of the code path in PostmasterMain() where
> we print non-runtime-computed parameters?

The log_min_messages dance avoids extra output when inspecting
non-runtime-computed GUCs, like this:

	~/pgdata$ postgres -D . -C log_min_messages -c log_min_messages=debug5
	debug5
	2022-05-10 09:06:04.728 PDT [3715607] DEBUG:  shmem_exit(0): 0 before_shmem_exit callbacks to make
	2022-05-10 09:06:04.728 PDT [3715607] DEBUG:  shmem_exit(0): 0 on_shmem_exit callbacks to make
	2022-05-10 09:06:04.728 PDT [3715607] DEBUG:  proc_exit(0): 0 callbacks to make
	2022-05-10 09:06:04.728 PDT [3715607] DEBUG:  exit(0)

AFAICT you need to set log_min_messages to at least DEBUG3 to see extra
output for the non-runtime-computed GUCs, so it might not be worth the
added complexity.

> I am not really worrying
> about users deciding to set log_min_messages to PANIC in
> postgresql.conf when it comes to postgres -C, TBH, as they'd miss the
> FATAL messages if the command is attempted on a server already
> starting.

I don't have a strong opinion on this one.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (108+ messages)  latest in thread

Message-ID: <20220510161249.GA3715618@nathanxps13>
Permalink:  ../20220510161249.GA3715618@nathanxps13/
Also on:    postgresql.org/message-id/20220510161249.GA3715618@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: nathandbossart@gmail.com, michael@paquier.xyz, magnus@hagander.net, bossartn@amazon.com, masao.fujii@oss.nttdata.com, pryzby@telsasoft.com, andres@anarazel.de, mark.dilger@enterprisedb.com, don@seiler.us, pgsql-hackers@postgresql.org
  Subject: Re: Estimating HugePages Requirements?
  In-Reply-To: <20220510161249.GA3715618@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox