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

2017-08-19 Thread Scott Mead
> On Aug 19, 2017, at 04:05, twoflower wrote: > > 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: >

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

2017-08-19 Thread twoflower
Alvaro Herrera-9 wrote > I saw one installation with "gsutil cp" in archive_command recently. > Ithad the CLOUDSDK_PYTHON environment variable set in the > archive_commanditself. Maybe that's a problem. After all, this was the solution: archive_command = 'CLOUDSDK_PYTHON=/usr/bin/python gsutil c

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

2017-08-18 Thread twoflower
Mark Watson-12 wrote > I think the parameter %p contains the complete path of the file It does not, see the link to the official documentation above. -- View this message in context: http://www.postgresql-archive.org/archive-command-fails-but-works-outside-of-Postgres-tp5979040p5979061.html Se

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

2017-08-18 Thread twoflower
Alvaro Herrera-9 wrote > I saw one installation with "gsutil cp" in archive_command recently. > Ithad the CLOUDSDK_PYTHON environment variable set in the > archive_commanditself. Maybe that's a problem. That's not the case here, I don't have this variable set anywhere where gsutil works. Alvaro

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

2017-08-18 Thread twoflower
Scott Marlowe-2 wrote > Sounds like it depends on some envvar it doesn't see when run from the > postmaster. If you sudo -u postgres and run it does it work? Yes, I can do su postgres, execute the command and it works. -- View this message in context: http://www.postgresql-archive.org/archive

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

2017-08-18 Thread Mark Watson
De : pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] De la part de twoflower Envoyé : Friday, August 18, 2017 2:40 PM À : pgsql-general@postgresql.org Objet : [GENERAL] archive_command fails but works outside of Postgres I changed my archive_command to the

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

2017-08-18 Thread Alvaro Herrera
Scott Marlowe wrote: > On Fri, Aug 18, 2017 at 12:40 PM, twoflower wrote: > > I changed my archive_command to the following: > > > > archive_command = 'gsutil cp /storage/postgresql/9.6/main/%p > > gs://my_bucket/pg_xlog/' > > 2017-08-18 18:34:25.057 GMT [1436][0]: [104321] WARNING: archiving >

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

2017-08-18 Thread Scott Marlowe
On Fri, Aug 18, 2017 at 12:40 PM, twoflower wrote: > I changed my archive_command to the following: > > archive_command = 'gsutil cp /storage/postgresql/9.6/main/%p > gs://my_bucket/pg_xlog/' > > and it fails, leaving the following in the log: > > 2017-08-18 18:34:25.057 GMT [1436][0]: [104319] LO

[GENERAL] archive_command fails but works outside of Postgres

2017-08-18 Thread twoflower
I changed my archive_command to the following: archive_command = 'gsutil cp /storage/postgresql/9.6/main/%p gs://my_bucket/pg_xlog/' and it fails, leaving the following in the log: 2017-08-18 18:34:25.057 GMT [1436][0]: [104319] LOG: archive command failed with exit code 12017-08-18 18:34:25.057