Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9zsY-0006GW-Ph for pgsql-admin@arkaria.postgresql.org; Sun, 02 Feb 2014 16:26:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W9zsY-0006Rn-6f for pgsql-admin@arkaria.postgresql.org; Sun, 02 Feb 2014 16:26:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9zsX-0006Rh-BQ for pgsql-admin@postgresql.org; Sun, 02 Feb 2014 16:26:41 +0000 Received: from mail-ie0-f177.google.com ([209.85.223.177]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9zsT-0001w8-NP for pgsql-admin@postgresql.org; Sun, 02 Feb 2014 16:26:40 +0000 Received: by mail-ie0-f177.google.com with SMTP id at1so5445406iec.8 for ; Sun, 02 Feb 2014 08:26:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=4NeRt3i/EsTLOnkhjLJe9nDeCSSvSOmHBdl6v/bsmnQ=; b=P7uL91iOy25nvSX6Zor53Oy3Ny6hzxzd/IZ4f+mqMfKnuhEbMjGx+Qzb0AHT9Qv6Gm DLAMVfil2LIQONVlGSf3g+WKOt1N+rTrKM1btPmALF1FVBOk86umB9HTWW73tLKmEqH8 BKC4nkCXNWu7qjKwoV651Suo++SZzfNQzaVttj/DdcctYfXF3f665HEYUO7CQAh/FBHo 098spJPmFG2mTmP6ZXB49wCd7nwCTbbD06G5XCRxY05xAl/XPjGnSyJjPtvQutf1yOLJ O8AjpuUPZOBvF9sHQ5qzdrTKSc8TZi6vWg/B96/iS+9S0pOhYKAVLrd3EhZkdtVPcaTO FzPg== X-Gm-Message-State: ALoCoQlqK8wyPq4nwbpbRgSAFb8DseLM8TdqziwVaUJbD6JuukVxJHUXGxBZ+T1H4kcOVRFutzjN X-Received: by 10.50.13.9 with SMTP id d9mr8181398igc.25.1391358395647; Sun, 02 Feb 2014 08:26:35 -0800 (PST) Received: from Kevins-MacBook-Pro.local ([67.148.186.194]) by mx.google.com with ESMTPSA id y7sm20762440igl.8.2014.02.02.08.26.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Feb 2014 08:26:34 -0800 (PST) Message-ID: <52EE71B9.3090204@consistentstate.com> Date: Sun, 02 Feb 2014 09:26:33 -0700 From: CS DBA User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Raghavendra CC: pgsql-admin Subject: Re: Cannot change archive_command with a reload References: <52EE69AF.4030709@consistentstate.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------050007020403070204030502" X-Pg-Spam-Score: -1.6 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is a multi-part message in MIME format. --------------050007020403070204030502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2/2/14, 9:19 AM, Raghavendra wrote: > > > On Sun, Feb 2, 2014 at 9:22 PM, CS DBA > 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. we want to copy the file to /data/wal_tmp, then do a mv to /data/wal so our process that ships a copy to the standby servers never see's a partial file (since it watches /data/wal) > > 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/ > --------------050007020403070204030502 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 2/2/14, 9:19 AM, Raghavendra wrote:


On Sun, Feb 2, 2014 at 9:22 PM, CS DBA <cs_dba@consistentstate.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.

we want to copy the file to /data/wal_tmp, then do a mv to /data/wal so our process that ships a copy to the standby servers never see's a partial file (since it watches /data/wal)



---
Regards,
Raghavendra
EnterpriseDB Corporation


--------------050007020403070204030502--