public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: David G. Johnston <[email protected]>
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: values of column source in pg_settings
Date: Wed, 10 Sep 2025 23:35:45 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwbuCSqXH=n-9DY7-J0ss90f1+rF1pb+g8jCoZG5g2dhvA@mail.gmail.com>
References: <[email protected]>
<CAKFQuwbuCSqXH=n-9DY7-J0ss90f1+rF1pb+g8jCoZG5g2dhvA@mail.gmail.com>
On Wed, 2025-09-10 at 12:39 -0700, David G. Johnston wrote:
> > postgres# select name, source from pg_settings where source like 'environ%';
> > name | source
> > -----------------+----------------------
> > max_stack_depth | environment variable
> >
> > What is the meaning of ‘environment_variable’ here?
>
> Operating system and/or shell variable. Established in the parent process’s environment before starting the server.
Almost. "src/backend/utils/misc/guc.c" has this comment:
/*
* rlimit isn't exactly an "environment variable", but it behaves about
* the same. If we can identify the platform stack depth rlimit, increase
* default stack depth setting up to whatever is safe (but at most 2MB).
* Report the value's source as PGC_S_DYNAMIC_DEFAULT if it's 2MB, or as
* PGC_S_ENV_VAR if it's reflecting the rlimit limit.
*/
Looking at the code, you seem to get "environment variable" if "ulimit -s"
is less than 2560 and "default" when it is bigger...
Yours,
Laurenz Albe
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: values of column source in pg_settings
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox