Re: Bug with pg_ctl -w/wait and config-only directories
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: "Mr. Aaron W. Swenson" <titanofold@gentoo.org>
Cc: pgsql-hackers@postgresql.org
Date: 2011-10-01T22:54:37Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix nested PlaceHolderVar expressions that appear only in targetlists.
- ceaf5052c6a7 8.4.9 cited
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. +