From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "msalais(at)msym(dot)fr" <msalais(at)msym(dot)fr> |
Cc: | "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: values of column source in pg_settings |
Date: | 2025-09-10 21:35:45 |
Message-ID: | f8872ac0c3fbb9256cd7fc9f7563de61fd80f64f.camel@cybertec.at |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Raj | 2025-09-11 13:31:26 | Pgbouncer |
Previous Message | David G. Johnston | 2025-09-10 19:55:47 | Re: values of column source in pg_settings |