Thread: pg_ctl cannot find postgresql.conf

pg_ctl cannot find postgresql.conf

From
Дмитрий Карасёв
Date:
pg_ctl (PostgreSQL) 14.4
PGDATA=/mnt/disk/base/postgresql/14/main
ERROR:
pg_ctl start
ожидание запуска сервера....postgres не может открыть файл конфигурации сервера "/mnt/disk/base/postgresql/14/main/postgresql.conf": No such file or directory
but postgresql.conf located in  /etc/postgresql/14/main/postgresql.conf
 
С уважением,
Дмитрий Карасёв
karasev.dmitrii94@mail.ru

Re: pg_ctl cannot find postgresql.conf

From
"David G. Johnston"
Date:
On Wednesday, July 13, 2022, Дмитрий Карасёв <karasev.dmitrii94@mail.ru> wrote:
pg_ctl (PostgreSQL) 14.4
PGDATA=/mnt/disk/base/postgresql/14/main
ERROR:
pg_ctl start
ожидание запуска сервера....postgres не может открыть файл конфигурации сервера "/mnt/disk/base/postgresql/14/main/postgresql.conf": No such file or directory
but postgresql.conf located in  /etc/postgresql/14/main/postgresql.conf
 


This isn’t a bug.  Use the command line options or environment variables to tell pg_ctl where to find the configuration file in the non-default location.

David J.
 

Re: pg_ctl cannot find postgresql.conf

From
Juan José Santamaría Flecha
Date:

On Wed, Jul 13, 2022 at 2:29 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wednesday, July 13, 2022, Дмитрий Карасёв <karasev.dmitrii94@mail.ru> wrote:
pg_ctl (PostgreSQL) 14.4
PGDATA=/mnt/disk/base/postgresql/14/main
ERROR:
pg_ctl start
ожидание запуска сервера....postgres не может открыть файл конфигурации сервера "/mnt/disk/base/postgresql/14/main/postgresql.conf": No such file or directory
but postgresql.conf located in  /etc/postgresql/14/main/postgresql.conf
 

This isn’t a bug.  Use the command line options or environment variables to tell pg_ctl where to find the configuration file in the non-default location.

Maybe you are working on a Debian environment, in that case you should be using 'pg_ctlcluster' as a 'pg_ctl' replacement:


Regards,

Juan José Santamaría Flecha