Confirming precedence order of Default for GUCs

From: Manav Kumar <mkumar(at)yugabyte(dot)com>
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Confirming precedence order of Default for GUCs
Date: 2025-05-21 08:06:56
Message-ID: CAPhCW+_sxtUDCcJd0=WN4iC6Ag33QQ0-ifrGY5mspSechVrb6A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi Team,
Can you please correct me regarding the precedence order of overriding the
DEFAULT values for GUC's.

Is it right to say, GUC passed in the start up packet will override the
default value set by using ALTER DATABASE/ROLE. ?
I've verified by running locally.
But in the https://arc.net/l/quote/qnpjwhcw (DOCS) it says ALTER
DATABASE/ROLE can override the cmd line options passed in startup packet.
Also just below that paragraph for Interaction with Shell, it says about
startup/cmd line options only overriding the default set via alter system
or postgresql.conf

Please correct me is it correct order of applying the defaults:

1. Using start up packet (i.e using env var or passing cmd line option)
2. Using alter database/role
3. Setting via postgresql.conf or using alter system

Looking forward to hearing the response.
Thanks
Manav

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2025-05-21 13:35:33 Re: Confirming precedence order of Default for GUCs
Previous Message Álvaro Herrera 2025-05-10 19:13:13 Re: Detached partitioning tables with RF keys in latest minor version is changed