Re: Cannot change archive_command with a reload

From: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>
To: CS DBA <cs_dba(at)consistentstate(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Cannot change archive_command with a reload
Date: 2014-02-02 16:19:51
Message-ID: CA+h6AhgvJTdb41peyGFeOnpigG6uzJQbH7iZaDRfoWuT+wQ+YA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sun, Feb 2, 2014 at 9:22 PM, CS DBA <cs_dba(at)consistentstate(dot)com> wrote:

> Hi all;
>
> we have a cluster running with an archive command that is failing.
> I tried a reload and the value does not change
>
>
Reload with new value won't work until you fix the failing archive_command.

Eg:-

ps -ef | grep arch
postgres 29743 29736 0 Jan30 ? 00:00:00 postgres: archiver process
failed on 00000001000000010000003D

and it might cause same error you are experiencing as

postgres=# select set_config('archive_command','cp %p
/opt/PostgreSQL/9.3/a93/%f',false);
ERROR: parameter "archive_command" cannot be changed now

So, fix the archive_command first and then give new changes.

Tried a set_config and I get this error:
>
> select set_config ('archive_command', 'cp %p /data/wal_tmp/%f && mv
> /data/wal_tmp/%f /data/wal/&f', 'false');
> ERROR: parameter "archive_command" cannot be changed now
>
>
If your archive_command pointing to "/data/wal_tmp" then please ensure that
directory exists there. If that directory not present then archive process
fail to copy the transaction logs. When archiver process in failed state
you cannot apply any new changes to the archive_command it will fail.

Also, am surprised to see "mv" command, basically the archive_command meant
to have a copies of pg_xlogs but not any OS related directory movements.

Link on archive_command:
http://www.postgresql.org/docs/9.2/static/runtime-config-wal.html

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message CS DBA 2014-02-02 16:26:33 Re: Cannot change archive_command with a reload
Previous Message CS DBA 2014-02-02 16:03:29 Re: Cannot change archive_command with a reload