Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WA0Wm-0007dg-2t for pgsql-admin@arkaria.postgresql.org; Sun, 02 Feb 2014 17:08:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WA0Wl-0003Cu-Iq for pgsql-admin@arkaria.postgresql.org; Sun, 02 Feb 2014 17:08:15 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WA0Wk-0003BK-5F for pgsql-admin@postgresql.org; Sun, 02 Feb 2014 17:08:14 +0000 Received: from mail-ie0-f178.google.com ([209.85.223.178]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WA0Wh-0002hp-Pl for pgsql-admin@postgresql.org; Sun, 02 Feb 2014 17:08:13 +0000 Received: by mail-ie0-f178.google.com with SMTP id x13so5835046ief.9 for ; Sun, 02 Feb 2014 09:08:10 -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=p9oFj/kRFADk5tGbUEvilWdufCet23aNw5DGe2TlE28=; b=N63MbYvdLSg2hszn/bptI5Y3npjjO99RtjvrzRxhsl6v7v9NQCbEzrFod/9dVKJGCD qj1tM57KZMZJfmiGKTsVIEFUNClpva/ZL+VFztD3r3KHdR69f2f0qe6GJhno4Z+p9itk KBj4tXKY8T9rj6AQWJ85satJMMeUSZlJGPBmzkirmaBE4TbkJR95d+ZJD/Q0X3yLy06t Jdw5Dq0U1Z+BhtadQLSwzHQznjpWYQUecrGToppEttm86yNtTF2FPLG1Le8TadOxAFer KP5HIbg9RgEe+jeE81r21d7pJMOcnDb/T2s1bXzDed6Kz59WVIiO3+q1XwuoMbuDcwq0 yScg== X-Gm-Message-State: ALoCoQk2yFkD8PAlbxgBRzQtcm3Fqvz3oG8pDxB+jSmMqGQ+dwgliVQ56XP6LSCQIcveb4UBGfky X-Received: by 10.50.128.137 with SMTP id no9mr8452553igb.36.1391360890631; Sun, 02 Feb 2014 09:08:10 -0800 (PST) Received: from Kevins-MacBook-Pro.local ([67.148.186.194]) by mx.google.com with ESMTPSA id w4sm21079948igb.5.2014.02.02.09.08.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Feb 2014 09:08:10 -0800 (PST) Message-ID: <52EE7B79.3070009@consistentstate.com> Date: Sun, 02 Feb 2014 10:08:09 -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> <52EE71B9.3090204@consistentstate.com> <52EE78EA.7070801@consistentstate.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------060904010708090208080807" X-Pg-Spam-Score: -2.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. --------------060904010708090208080807 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2/2/14, 10:04 AM, Raghavendra wrote: > > > My issue is the &f instead of %f at the end. However here's the > intent: > > if the first command is true (cp %p /data/wal_tmp/%f) then I want > the second command to execute (mv /data/wal_tmp/%f /data/wal/%f) > > > In this case archiver process fail, because there won't be directory > called /data/wal_tmp anymore with your your "mv" command. were moving the file %f not the directory > since both directories are in the same file system the mv is > immediate so any process watching for files to show up in > /data/wal will never see a partial file > > > "partial file" ? > Its 16MB file in any case there won't be any partial files, because > after completion of writing 16mb file in xlog it will come to archive > location else not. we dont want the log shipper process to ship a file that is still being copied from pg_xlog > > --Raghav > > --------------060904010708090208080807 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 2/2/14, 10:04 AM, Raghavendra wrote:

My issue is the &f instead of %f at the end.  However here's the intent:

if the first command is true (cp %p /data/wal_tmp/%f) then I want the second command to execute (mv /data/wal_tmp/%f /data/wal/%f)


In this case archiver process fail, because there won't be directory called /data/wal_tmp anymore with your your "mv" command.
were moving the file %f not the directory


since both directories are in the same file system the mv is immediate so any process watching for files to show up in /data/wal will never see a partial file


"partial file" ?
Its 16MB file in any case there won't be any partial files, because after completion of writing 16mb file in xlog it will come to archive location else not.

we dont want the log shipper process to ship a file that is still being copied from pg_xlog




--Raghav

 


--------------060904010708090208080807--