Re: [GENERAL] archive_command fails but works outside of Postgres
От | Alvaro Herrera |
---|---|
Тема | Re: [GENERAL] archive_command fails but works outside of Postgres |
Дата | |
Msg-id | 20170818194511.czfx4qdvsglx4yh3@alvherre.pgsql обсуждение исходный текст |
Ответ на | 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
Re: [GENERAL] archive_command fails but works outside of Postgres |
Список | pgsql-general |
Scott Marlowe wrote: > On Fri, Aug 18, 2017 at 12:40 PM, twoflower <standa.kurik@gmail.com> 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 > > transaction log file "000000010000038B000000D8" failed too many times, will > > try again later > 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? 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. 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. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-general по дате отправления: