Re: [GENERAL] archive_command fails but works outside of Postgres

Поиск
Список
Период
Сортировка
От twoflower
Тема Re: [GENERAL] archive_command fails but works outside of Postgres
Дата
Msg-id 1503129923508-5979093.post@n3.nabble.com
обсуждение исходный текст
Ответ на Re: [GENERAL] archive_command fails but works outside of Postgres  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: [GENERAL] archive_command fails but works outside of Postgres  (Scott Mead <scottm@openscg.com>)
Список pgsql-general
Alvaro Herrera-9 wrote
I saw one installation with "gsutil cp" in archive_command recently. It had the CLOUDSDK_PYTHON environment variable set in the archive_command itself. Maybe that's a problem.
After all, this was the solution:
archive_command = 'CLOUDSDK_PYTHON=/usr/bin/python gsutil cp /storage/postgresql/9.6/main/pg_xlog/%p gs://my_bucket/'
as also hinted in https://github.com/GoogleCloudPlatform/gsutil/issues/402

I still don't understand why the environments differ (the context of archive_command vs. "su postgres -" and executing it there) but I am happy it's working now. Thank you!

View this message in context: Re: archive_command fails but works outside of Postgres
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

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

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: [GENERAL] Count column with name 'count' returns multiple rows.Why?
Следующее
От: Scott Mead
Дата:
Сообщение: Re: [GENERAL] archive_command fails but works outside of Postgres