Re: [GENERAL] archive_command fails but works outside of Postgres
От
Scott Mead
Тема
Re: [GENERAL] archive_command fails but works outside of Postgres
Дата
Msg-id
BF0C86B3-6677-4720-B1D7-47D567242EB5@openscg.com
Ответ на
Список
Дерево обсуждения
[GENERAL] archive_command fails but works outside of Postgres twoflower <standa.kurik@gmail.com>
Re: [GENERAL] archive_command fails but works outside of Postgres Mark Watson <mark.watson@jurisconcept.ca>
Re: [GENERAL] archive_command fails but works outside of Postgres twoflower <standa.kurik@gmail.com>
Re: [GENERAL] archive_command fails but works outside of Postgres Scott Marlowe <scott.marlowe@gmail.com>
Re: [GENERAL] archive_command fails but works outside of Postgres twoflower <standa.kurik@gmail.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 twoflower <standa.kurik@gmail.com>
Re: [GENERAL] archive_command fails but works outside of Postgres twoflower <standa.kurik@gmail.com>
Re: [GENERAL] archive_command fails but works outside of Postgres Scott Mead <scottm@openscg.com>
After all, this was the solution:Alvaro Herrera-9 wroteI 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.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!
If postgres is running under systemd, you'll have a wildly different environment than if you just su to postgres.
--Scott
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 по дате отправления
От: twoflower
Дата: