order of reading the conf files

Started by BKover 7 years ago6 messagesgeneral
Jump to latest
#1BK
kbn98406@gmail.com

Hi,

may i know the order in which postgres reads the configuration files like
conf , auto.conf , hba ?
and how does postmaster forks postgres , can we see that forking process in
logfile ?

Thanks,
Banu.

#2Rene Romero Benavides
rene.romero.b@gmail.com
In reply to: BK (#1)
Re: order of reading the conf files

Why do you need to know that ?

Am Do., 6. Dez. 2018 um 01:21 Uhr schrieb bhargav kamineni <
kbn98406@gmail.com>:

Hi,

may i know the order in which postgres reads the configuration files like
conf , auto.conf , hba ?
and how does postmaster forks postgres , can we see that forking process
in logfile ?

Thanks,
Banu.

--
El genio es 1% inspiración y 99% transpiración.
Thomas Alva Edison
http://pglearn.blogspot.mx/

#3Stephen Frost
sfrost@snowman.net
In reply to: Rene Romero Benavides (#2)
Re: order of reading the conf files

Greetings,

* Rene Romero Benavides (rene.romero.b@gmail.com) wrote:

Why do you need to know that ?

Please don't top-post, first, and second, it certainly seems like a
worthwhile thing to want to know, for a variety of reasons, such as
"what takes precedence- ALTER SYSTEM, or a configuration in
postgresql.conf?"

Am Do., 6. Dez. 2018 um 01:21 Uhr schrieb bhargav kamineni <
kbn98406@gmail.com>:

may i know the order in which postgres reads the configuration files like
conf , auto.conf , hba ?

The regular postgresql.conf file is read first, then
postgresql.auto.conf and then pg_hba.conf and pg_ident.conf. We can't
read pg_hba.conf/pg_ident.conf before reading postgresql.conf and
postgresql.auto.conf because their location is specified in
postgresql.conf/postgresql.auto.conf.

and how does postmaster forks postgres , can we see that forking process
in logfile ?

If you have log_connections enabled, we'll log the 'connection received'
message very shortly after fork'ing.

You could also enable DEBUG2 (or higher) to see the fork from the parent
process.

Thanks!

Stephen

#4Thomas Kellerer
spam_eater@gmx.net
In reply to: Stephen Frost (#3)
Re: order of reading the conf files

Stephen Frost schrieb am 06.12.2018 um 15:52:

The regular postgresql.conf file is read first, then
postgresql.auto.conf and then pg_hba.conf and pg_ident.conf. We can't
read pg_hba.conf/pg_ident.conf before reading postgresql.conf and
postgresql.auto.conf because their location is specified in
postgresql.conf/postgresql.auto.conf.

When are the .conf files read that are included from within "postgresql.conf"?
The manual is not clear about that.

Are they processed before "postgresql.auto.conf" or after?

Thomas

#5Stephen Frost
sfrost@snowman.net
In reply to: Thomas Kellerer (#4)
Re: order of reading the conf files

Greetings,

* Thomas Kellerer (spam_eater@gmx.net) wrote:

Stephen Frost schrieb am 06.12.2018 um 15:52:

The regular postgresql.conf file is read first, then
postgresql.auto.conf and then pg_hba.conf and pg_ident.conf. We can't
read pg_hba.conf/pg_ident.conf before reading postgresql.conf and
postgresql.auto.conf because their location is specified in
postgresql.conf/postgresql.auto.conf.

When are the .conf files read that are included from within "postgresql.conf"?
The manual is not clear about that.

At the time we hit the 'include' line.

Are they processed before "postgresql.auto.conf" or after?

postgresql.auto.conf is always last.

Thanks!

Stephen

#6BK
kbn98406@gmail.com
In reply to: Stephen Frost (#5)
Re: order of reading the conf files

Thanks a lot Stephen.

On Thu, Dec 6, 2018 at 8:53 PM Stephen Frost <sfrost@snowman.net> wrote:

Show quoted text

Greetings,

* Thomas Kellerer (spam_eater@gmx.net) wrote:

Stephen Frost schrieb am 06.12.2018 um 15:52:

The regular postgresql.conf file is read first, then
postgresql.auto.conf and then pg_hba.conf and pg_ident.conf. We can't
read pg_hba.conf/pg_ident.conf before reading postgresql.conf and
postgresql.auto.conf because their location is specified in
postgresql.conf/postgresql.auto.conf.

When are the .conf files read that are included from within

"postgresql.conf"?

The manual is not clear about that.

At the time we hit the 'include' line.

Are they processed before "postgresql.auto.conf" or after?

postgresql.auto.conf is always last.

Thanks!

Stephen