Re: moving postgresql.conf: pg_ctl can't find postmaster.pid anymore - Mailing list pgsql-admin

From Ludo Smissaert
Subject Re: moving postgresql.conf: pg_ctl can't find postmaster.pid anymore
Date
Msg-id 4AEEFE26.30201@ludikidee.com
Whole thread Raw
In response to Re: moving postgresql.conf: pg_ctl can't find postmaster.pid anymore  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Tom Lane wrote:
> Ludo Smissaert <ludo@ludikidee.com> writes:
>> Both methods works fine on server startup, but the first method gives
>> problems when stopping the server with pg_ctl.
>
> Yeah, pg_ctl is far too stupid to cope with such things --- it expects
> that PGDATA points at the data directory.  Short of teaching it to parse
> the config file it's not clear what we could do about that.

Thanks. Summarizing:

$ ls /etc/postgresql
postgresql.conf pg_hba.conf pg_ident.conf

$ pg_ctl -D /var/postgresql/data -o "-D /etc/postgresql" start -l ...

... server started

$ pg_ctl -D /var/postgresql/data -o "-D /etc/postgresql" stop -m fast

works for the first method, and for the second:

$ pg_ctl -D /var/postgresql/data/ \
   -o "-c config_file='/etc/postgresql/postgresql.conf'" -l ... start

and for stopping the same.

Have a nice day/night,

Ludo

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: moving postgresql.conf: pg_ctl can't find postmaster.pid anymore
Next
From: wstrzalka
Date:
Subject: Re: How can I know ./configure options for binary installation