Обсуждение: [HACKERS] initdb w/ restart

Поиск
Список
Период
Сортировка

[HACKERS] initdb w/ restart

От
Jesper Pedersen
Дата:
Hi,

In a case of

initdb /tmp/pgsql

followed by

pg_ctl -D /tmp/pgsql/ -l /tmp/logfile restart

you'll get

pg_ctl: PID file "/tmp/pgsql/postmaster.pid" does not exist
Is server running?
starting server anyway
pg_ctl: could not read file "/tmp/pgsql/postmaster.opts"

The attached patch changes the message to "trying to start server 
anyway" to highlight it is an attempt, not something that will happen.

Probably not a good idea to change the logic around pg_ctl.c:688, hence 
this suggestion.

Thoughts ?

Best regards,
  Jesper

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

Re: [HACKERS] initdb w/ restart

От
Peter Eisentraut
Дата:
On 9/28/17 15:40, Jesper Pedersen wrote:
> In a case of
> 
> initdb /tmp/pgsql
> 
> followed by
> 
> pg_ctl -D /tmp/pgsql/ -l /tmp/logfile restart
> 
> you'll get
> 
> pg_ctl: PID file "/tmp/pgsql/postmaster.pid" does not exist
> Is server running?
> starting server anyway
> pg_ctl: could not read file "/tmp/pgsql/postmaster.opts"
> 
> The attached patch changes the message to "trying to start server 
> anyway" to highlight it is an attempt, not something that will happen.

committed

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers