Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YlCEK-0004uc-ET for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2015 08:11:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YlCEJ-0000ZP-Mo for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2015 08:11:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YlCEI-0000ZJ-IQ for pgsql-hackers@postgresql.org; Thu, 23 Apr 2015 08:11:26 +0000 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1YlCEG-0006kZ-HL for pgsql-hackers@postgresql.org; Thu, 23 Apr 2015 08:11:25 +0000 Received: by widdi4 with SMTP id di4so83462328wid.0 for ; Thu, 23 Apr 2015 01:11:22 -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=pIWK/0wkKnBW27/6x/WLteXofsqOX6WNu7PDNstDnQk=; b=rV7SOFiF2dvLy1aBAXseaK7SJxkRIK9vsluKXwQ359iKN6QYLxJ2GkDTT61l6lVsVI 3Q5Q0za8lvvM8Nln+1vcoDu74Hg4yuZ3NgQkB1xBYwhs1FjvUhYCxpPUA63jL+reLjIw ElI9rM5Oy50qceOsWy5e/lmN553nn6SLX8hiC8mJt4dkaOyE2iV+5h7EptEsgNbQMdBD qQynfYwTVu2ZJRDkAGKe57ZdEcnNY7Z5SidieNHgqphgcCCwZWRAv/317eg0y1/L1yNe Uj337UYjahW9sgKLrMlLU/eR70cfKersphcHljVQiFj7Ozh9bTIPwqfYt4KQZ/ET/gM6 ZsRQ== X-Received: by 10.194.133.133 with SMTP id pc5mr2933776wjb.31.1429776682739; Thu, 23 Apr 2015 01:11:22 -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 gj7sm27976652wib.4.2015.04.23.01.11.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 01:11:21 -0700 (PDT) Message-ID: <5538A927.7000407@iki.fi> Date: Thu, 23 Apr 2015 11:11:19 +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.6.0 MIME-Version: 1.0 To: Robert Haas CC: Michael Paquier , Venkata Balaji N , Andres Freund , Fujii Masao , Borodin Vladimir , PostgreSQL-development Subject: Re: Streaming replication and WAL archive interactions References: <548AF1CB.80702@vmware.com> <689EB259-44C2-4820-B901-4F6B1C55A1E4@simply.name> <549083D6.1000301@vmware.com> <54949108.3030109@vmware.com> <552FA38F.9060005@iki.fi> <5535FE71.1010905@iki.fi> <55362CAD.2000207@iki.fi> <55373D17.5050706@iki.fi> <5537EFEF.6060808@iki.fi> <5537F7AD.1060604@iki.fi> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.4 (--) 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 04/22/2015 11:58 PM, Robert Haas wrote: > On Wed, Apr 22, 2015 at 3:34 PM, Heikki Linnakangas wrote: >> On 04/22/2015 10:21 PM, Robert Haas wrote: >>> On Wed, Apr 22, 2015 at 3:01 PM, Heikki Linnakangas >>> wrote: >>>> For example, imagine that perform point-in-time recovery to WAL position >>>> 0/1237E568, on timeline 1. That falls within segment >>>> 000000010000000000000012. Then we end recovery, and switch to timeline 2. >>>> After the switch, and some more WAL-logged actions, we'll have these >>>> files >>>> in pg_xlog: >>>> >>>> 000000010000000000000011 >>>> 000000010000000000000012 >>>> 000000020000000000000012 >>>> 000000020000000000000013 >>>> 000000020000000000000014 >>> >>> >>> Is the 000000010000000000000012 file a "partial" segment of the sort >>> you're proposing to no longer achive? >> >> If you did pure archive recovery, with no streaming replication involved, >> then no. If it was created by streaming replication, and the replication had >> not filled the whole segment yet, then yes, it would be a partial segment. > > Why the difference? Because we don't archive partial segments, except for the last one at a timeline switch, and there was no timeline switch to timeline 1 within that segment. It doesn't really matter, though. The behaviour at the switch from timeline 1 to 2 works the same, whether the 000000010000000000000012 segment is complete or not. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers