From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tanja Savic <tanja.savic@crossmasters.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: pg_ctl can't start db server
Date: Fri, 29 May 2020 11:32:14 -0400
Message-ID: <10527.1590766334@sss.pgh.pa.us> (raw)
In-Reply-To: <VI1PR02MB3023BFD1415100747B1D9397948F0@VI1PR02MB3023.eurprd02.prod.outlook.com>
References: <VI1PR02MB3023BFD1415100747B1D9397948F0@VI1PR02MB3023.eurprd02.prod.outlook.com>
Tanja Savic <tanja.savic@crossmasters.com> writes:
> The configuration file path is /etc/postgresql/12/main/ postgresql.conf and it is configured in /var/lib/postgresql/12/main/postmaster.opts:
> "/usr/lib/postgresql/12/bin/postgres "-D" "/var/lib/postgresql/12/main" "-c" "config_file=/etc/postgresql/12/main/postgresql.conf"
> Why does pg_ctl complains about the postgresql.conf path?
I don't remember the exact interaction between -D and an explicit
config_file setting, but evidently it's not working the way you wish.
See
https://www.postgresql.org/docs/current/runtime-config-file-locations.html
which suggests that you should use -D to point at the directory where
postgresql.conf is, and set the data directory with a parameter within
postgresql.conf.
(Note that pg_ctl probably only understands this way, even though
theoretically the postmaster can deal with other approaches to
setting up an external config file.)
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, tanja.savic@crossmasters.com
Subject: Re: pg_ctl can't start db server
In-Reply-To: <10527.1590766334@sss.pgh.pa.us>
References: <VI1PR02MB3023BFD1415100747B1D9397948F0@VI1PR02MB3023.eurprd02.prod.outlook.com> <10527.1590766334@sss.pgh.pa.us>
* 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