Re: [GENERAL] archive_command fails but works outside of Postgres - Mailing list pgsql-general

From twoflower
Subject Re: [GENERAL] archive_command fails but works outside of Postgres
Date
Msg-id 1503088909427-5979060.post@n3.nabble.com
Whole thread Raw
In response to Re: [GENERAL] archive_command fails but works outside of Postgres  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List 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.
That's not the case here, I don't have this variable set anywhere where gsutil works.
Alvaro Herrera-9 wrote
Another possible problem might be the lack of %f (this command seems to rely on the file being the same name at the other end, which isn't necessarily so) and the fact that %p is supposed to be the path of the file, so you shouldn't qualify it with the full path.
%p is not the full path, it is relative to the cluster's data directory (as described in the documentation). Not using %f is not a problem - gsutil is invoked in the following way:
gsutil <full_path> <storage_dir>
Also, as I mentioned, the command works fine when copied verbatim from the log error message and executed manually.

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 by date:

Previous
From: twoflower
Date:
Subject: Re: [GENERAL] archive_command fails but works outside of Postgres
Next
From: twoflower
Date:
Subject: Re: [GENERAL] archive_command fails but works outside of Postgres