Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YvjkH-00019n-D2 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 May 2015 10:00:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YvjkG-00011I-TI for pgsql-hackers@arkaria.postgresql.org; Fri, 22 May 2015 10:00:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YvjkF-00011B-Bi for pgsql-hackers@postgresql.org; Fri, 22 May 2015 09:59:59 +0000 Received: from mail-pd0-x230.google.com ([2607:f8b0:400e:c02::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1YvjkB-0003aN-0P for pgsql-hackers@postgresql.org; Fri, 22 May 2015 09:59:58 +0000 Received: by pdea3 with SMTP id a3so15813989pde.2 for ; Fri, 22 May 2015 02:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=I5/rtl7uZ0rEGQPK5YsJyXBavaqKdV0HeztXr+TPd/A=; b=oOeJaXkcjJltItM+1G1sQNbXD+tV6Xj5/9+Up5Ex02O83dBIw8SZBUj2F1sQC+Ycs1 0FIn8BY+4UcQIfjq3GNWxnB+tzQPJ6hQmFn1zdhb1E/7LKtGmpOsHhHUwGem++X4anlm YYSJ0JLvjzVD7hlKVDOby8jzV2tnZZIt113kj0uQblEI9wNy7XMEPF97yBx8KwaRQcE4 bZqZrdPe4y+8fb28TlG8nlfMbiBKdiKaPgLrpEoS2zbLBYzgPOqyg7oOk/OlXTB1Amvf eR5MbAuQ7RgMJt7RNa5behIoCa+J/+9A6a55xU/X7Sr+Nqi2Ohp+Ws0MXINWShh44pYZ ROYA== X-Received: by 10.70.51.67 with SMTP id i3mr14086269pdo.145.1432288792576; Fri, 22 May 2015 02:59:52 -0700 (PDT) Received: from [192.168.1.99] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by mx.google.com with ESMTPSA id i9sm1632769pdj.27.2015.05.22.02.59.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 02:59:51 -0700 (PDT) Message-ID: <555EFE10.2000002@iki.fi> Date: Fri, 22 May 2015 12:59:44 +0300 From: Heikki Linnakangas Reply-To: hlinnaka@iki.fi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Fujii Masao CC: pgsql-hackers Subject: Re: [COMMITTERS] pgsql: At promotion, archive last segment from old timeline with .parti References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 05/22/2015 12:35 PM, Fujii Masao wrote: > Doesn't this change break the case where we want to PITR to the recovery > target location in the last partial WAL file with the old timeline? > In this case, that partial WAL file needs to be read and replayed. But > since the suffix of its filename is .partial, unless DBA gets rid of the suffix, > the WAL file cannot be restored and PITR would fail. No? PITR to a specific location always requires manual intervention by the DBA anyway. It's not something you'd automate. Copying the .partial file manually into pg_xlog is just one small extra step. Even if there are some downsides to this, I think it's just plain evil to archive a partial segment that looks indistinguishable from a complete one. We have had reports of that causing confusion in production systems. What if the master had already archived the complete version of the segment before dying? The standby will try to archive a partial version of the same, which will fail, or worse, overwrite the complete version with the partial one. Note that PITR in that scenario was always hit-and-miss. First of all, if the master died, there is no guarantee that it archived all the previous segments successfully before dying. (archive_mode=always alleviates that in 9.5, as the standby will archive them even if the master didn't). (See discussion on this point at http://www.postgresql.org/message-id/5535FE71.1010905@iki.fi) - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers