Re: pg_ctl -w with postgresql.conf in non-default path - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: pg_ctl -w with postgresql.conf in non-default path
Date
Msg-id 48721502.6060303@dunslane.net
Whole thread Raw
In response to pg_ctl -w with postgresql.conf in non-default path  (<yo@hirano.cc>)
Responses Re: pg_ctl -w with postgresql.conf in non-default path  (HIRANO Yoshitaka <yo@hirano.cc>)
List pgsql-hackers

yo@hirano.cc wrote:
> Hello guys,
>
> This is my first post to this list..
>
> I'm using PostgreSQL8.3.3 and I moved postgresql.conf to the
> outside of DATA direcotory, and invoked postgres via pg_ctl
> as following.
>
> pg_ctl -w -D /data -o '--config-file=/home/hirano/postgresql.conf' start
>
> This seems to work well, but when I changed the port parameter in
> that postgresql.conf, pg_ctl waits for timeout by "-w" option.
> In this case, postgres correctly listens the port I wrote in
> config, but pg_ctl checkes the port in the data/postgresql.conf
> file.
>
> I think this is because the path to postgresql.conf is hard-coded
> in the pg_ctl.c
>
> | snprintf(conf_file, MAXPGPATH, "%s/postgresql.conf", pg_data);
>
> But actually there're no descriptions of --config-file option in the
> manual of postgres command, although I'm not sure how I could
> find it...
>
> Is it bad way to use --config-file option or pg_ctl bug?
>
>
>   

Try setting the port for pg_ctl: PGPORT=nnn pg_ctl -D datadir -w start

cheers

andrew


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: PATCH: CITEXT 2.0
Next
From: Bernd Helmle
Date:
Subject: Missing descriptions for aggregates