Re: Bug with pg_ctl -w/wait and config-only directories

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Bug with pg_ctl -w/wait and config-only directories
Дата
Msg-id 201110012254.p91Msbt10864@momjian.us
обсуждение исходный текст
Ответ на Re: Bug with pg_ctl -w/wait and config-only directories  ("Mr. Aaron W. Swenson" <titanofold@gentoo.org>)
Ответы Re: Bug with pg_ctl -w/wait and config-only directories
Список pgsql-hackers
Mr. Aaron W. Swenson wrote:
> I went through several iterations trying to find a command that can work
> the way we'd like it to. (Essentially is works the way you're describing
> it should.) So, in Gentoo, for the initscript, we have this really ugly
> command to start the server:
> 
>     su -l postgres \
>         -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
>             /usr/lib/postgresql-9.0/bin/pg_ctl \
>             start ${WAIT_FOR_START} -t ${START_TIMEOUT} -s -D ${DATA_DIR} \
>             -o '-D ${PGDATA} --data-directory=${DATA_DIR} \
>                 --silent-mode=true ${PGOPTS}'"
> 
> And to stop the server:
> 
>     su -l postgres \
>         -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
>             /usr/lib/postgresql-9.0/bin/pg_ctl \
>             stop ${WAIT_FOR_STOP} -t ${NICE_TIMEOUT} -s -D ${DATA_DIR} \
>             -m smart"
> 
> The default values for these are:
> 
>     PGPORT='5432'
>     PG_EXTRA_ENV=''
>     WAIT_FOR_START='-w'
>     START_TIMEOUT='60'
>     WAIT_FOR_STOP='-w'
>     NICE_TIMEOUT='60'
>     DATA_DIR='/var/lib/postgresql/9.0/data'
>     PGDATA='/etc/postgresql-9.0'
>     PGOPTS=''
> 
> We don't use 'pg_ctl restart', instead we stop and then start the
> server. So, I don't have an answer for that. I'd imagine passing '-D
> ${DATA_DIR}' would do the trick there as well.
> 
> Of course, simplifying this a bit would be welcome. 

What exactly is your question?  You are not using a config-only
directory but the real data directory, so it should work fine.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joe Abbate
Дата:
Сообщение: Re: pg_dump issues
Следующее
От: Daniel Farina
Дата:
Сообщение: Re: pg_cancel_backend by non-superuser