Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nK7TO-0004L6-EW for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Feb 2022 23:43:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nK7Sr-0001mb-Vj for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Feb 2022 23:42:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nK7Sr-0001mS-KE for pgsql-hackers@lists.postgresql.org; Tue, 15 Feb 2022 23:42:33 +0000 Received: from lahtoruutu.iki.fi ([185.185.170.37]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nK7So-0000c5-QY for pgsql-hackers@postgresql.org; Tue, 15 Feb 2022 23:42:32 +0000 Received: from [192.168.1.113] (dsl-hkibng22-54faa4-119.dhcp.inet.fi [84.250.164.119]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id E57041B00215; Wed, 16 Feb 2022 01:42:27 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1644968548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oliVB2q0cutCTWdAYGO1SzcM1JOVf6NJmTYj4+ryn/8=; b=cIsDFLXtSmMnJCmxSrTOOg3MbMhopGxSG99QW9rATgMGGNxdabEEx8RZjQtmaXSCumxOFT NsjhGjn31kUhA7B+8jn73JE+7ZeHBYERwD9U+ADdThCxKC8Aqo8BvQt3NVVCnGnt/BOcMq c4sTMer0VElxM1XisHrTgM1sEzlk+mtpBXHnSzPBHFf7HEvHhW/vTEtrETvcZg4RCb5aw3 kpQOso/M1tACq2FZlVt2LykPU9MG9QUCXCe8zoAaGb2nvaG3INRv/IHtFPAIoumR4pEAij xFslI3qcMUQbfZEXX+f3t6MDKyBFARZuV4SaiSt2wOqrihWmnoiRl6QTPfamUg== Message-ID: <40de25aa-2e20-08ad-e014-edb731594a74@iki.fi> Date: Wed, 16 Feb 2022 01:42:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: last_archived_wal is not necessary the latest WAL file (was Re: pgsql: Add test case for an archive recovery corner case.) Content-Language: en-US To: Tom Lane Cc: pgsql-hackers References: <2842251.1644849700@sss.pgh.pa.us> <8f15e602-337e-fbb2-4b2e-e83a01ef9088@iki.fi> <831b6ab9-45d6-7ab0-ea9c-6efd4383afb8@iki.fi> <3186114.1644960507@sss.pgh.pa.us> From: Heikki Linnakangas In-Reply-To: <3186114.1644960507@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1644968548; a=rsa-sha256; cv=none; b=oxSX4zTsrOxTf+nxqj8iDP+5s6Zm61pliigucomL29PVNYz2moub9Ep7TFm+u6k7nWAun9 wnSZZf769CuLKh8NZVKdl2CIRtxHZ2rAxMkYin7UxB6cIpPS5wI3YT5cT4UuULLsgmE6A2 uT6HTBES+YCTp+CAFHazTdI+pgABXa9Z2K080O+syDfziW/h7BxSEhun27JfpUv3XLMZEd pns8Vc3iNIhi+mdZBt6rNc7Hck4JoCxMg0oWvGwRIkjmXIRHqobNuqu32k07FTX6v4cHye KWo4bbL7GTQzIRdmp+2kJ751A1YAmq16RaCeGzXoPNhtGDPNFPW7rPey9C9QSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1644968548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oliVB2q0cutCTWdAYGO1SzcM1JOVf6NJmTYj4+ryn/8=; b=Ale7gf1kaBUehMJ2EK9luVwHsyWSSwGuQB3Aet0oQTv/JArFMnYhW5wEoK6OGJjfpd4qE7 p53x+hkuZI01c51AwOA4npcLMqYXDMvKDkd8zjO3P4kLzRZKfHdoxRkIX8FYzllmcH0pvt PowqtVNlgCK6Imfca3zVUn/OYEXGDZUkUya/jz3quGrHWx5fd2VLTnTa1uy5AL7wL7EAno lzgiYkE39v9UxeVcavkYB6qThL6GBUXNYg2sPy5VRTsy+URHpNVx1eoIVwbuyK1KypSRt1 msrFa5MwhGuCLh4zSa3q0YplhQR55fV90ytZ3w7w4f/42MBqocSiOV+aH2Ncow== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 15/02/2022 23:28, Tom Lane wrote: > Heikki Linnakangas writes: >> That was interesting: the order that WAL segments are archived when a >> standby is promoted is not fully deterministic. > > Oh, of course. > >> I find it a bit surprising that pg_stat_archiver.last_archived_wal is >> not necessarily the highest-numbered segment that was archived. I >> propose that we mention that in the docs, as in the attached patch. > > +1, but I think the description of that field in the pg-stat-archiver-view > table is also pretty misleading. Maybe like > > - Name of the last WAL file successfully archived > + Name of the WAL file most recently successfully archived > > and similarly s/last/most recent/ for the other fields claiming > to be "last" something. Makes sense, committed it that way. - Heikki