Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ukOwq-001rcM-QA for pgsql-general@arkaria.postgresql.org; Fri, 08 Aug 2025 15:24:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ukOwp-00EOOF-AL for pgsql-general@arkaria.postgresql.org; Fri, 08 Aug 2025 15:23:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ukOwo-00EOO7-97 for pgsql-general@lists.postgresql.org; Fri, 08 Aug 2025 15:23:58 +0000 Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ukOwk-001Sk7-2T for pgsql-general@lists.postgresql.org; Fri, 08 Aug 2025 15:23:57 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 51B601400049; Fri, 8 Aug 2025 11:23:52 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Fri, 08 Aug 2025 11:23:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1754666632; x=1754753032; bh=yG72YV4IqJdOKJrc5F2BcSd4jTovkkFHplMvy087nqk=; b= QKsU5UZSyZA6CvpqGgy6RjdD3kWJPSAjVdt3geKvWhIdaE1mQ6s5keYKEn+isYlu neuBkyl/1GAnyqsic2HbvO6qFvL7ic5Z2suBi4IRRauNieY9whD2fF58fVbzfvya nYKrF8FnnLaoMz0E5we9fk9GQa2HvomPtpp8cGemmm1rsnLLICf3kPYIxhKQSEry fwYuYazhCShlxSkoFAKZnL/TGLM3bnCAqpIaGyFtP7B/2ZmO8kFNkBoOJGcGKqgO qBuA7NCugcnpOa/Sz1ZEMsChBuRR4sOtZ0MRemcKbSvvlCFGplkj3+cAJdKlNyGc sRLcXMeihht1Upg6iGm+/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1754666632; x= 1754753032; bh=yG72YV4IqJdOKJrc5F2BcSd4jTovkkFHplMvy087nqk=; b=A voMFzwtcSygUIrJ+iES3BCZA1zqXt9mIGdaIQO8LQ26cGT0Ntw+OGVY6/uG/SBS7 cqReIG1Wa+BnTpOWZWmRn6iBQl9VZfvjksZT1CMJ7az18rnrknel9vxmKe4bBrV5 sP3L/knjKfip+W/WEfq8tWdcqgH+s6cYChmKCwgheLrDDL+pdWesp5LJk3jutFzh beyAphNUBYqVlKvcQVccVDPj1+pJU3mkcFJFrAfa+SUnTJ8lvsH2An+swDAK4YoZ Zi17IazfI/5wwSxtKpdAzQfI+PgQCLF6EuNa+hzzfwDNoOl1Bhm2T+q6F770rOsW dO+Zvb55NnFw68lfBdLhg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduvdegudeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekre dttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpefgudefkefhve efleevieeuveehvdduudekuddvvdelhfeuueeijedtuedvvedvueenucffohhmrghinhep phhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtgho mhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepsh hpgihlhiihuddvfeesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghn vghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Aug 2025 11:23:51 -0400 (EDT) Message-ID: Date: Fri, 8 Aug 2025 08:23:50 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Questions about the continuity of WAL archiving To: px shi Cc: pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/7/25 22:50, px shi wrote: > Thank you for your reply. > The archived files can be used for PITR (Point-In-Time Recovery), > allowing recovery to any point between WAL 80 and 100 on timeline 1. > Additionally, if there's a backup taken during timeline 1 and a > switchover to a new primary has occurred without taking a new full > backup yet, these WAL logs can still be used to recover to any point on > timeline 2. Alright I see. Two things: 1) What is the current archiving setup on the primary and why is lagging? 2) Have you looked at archiving off the standby node while it is in standby per: https://www.postgresql.org/docs/current/warm-standby.html#CONTINUOUS-ARCHIVING-IN-STANDBY > > Regards, > Pixian Shi > > Adrian Klaver > 于2025年8月8日周五 12:25写道: > > On 8/7/25 20:20, px shi wrote: > > Hi, > > There is a scenario: the current timeline of the PostgreSQL > primary node > > is 1, and the latest WAL file is 100. The standby node has also > received > > up to WAL file 100. However, the latest WAL file archived is only > file > > 80. If the primary node crashes at this point and the standby is > > promoted to the new primary, archiving will resume from file 100 on > > timeline 2. As a result, WAL files from 81 to 100 on timeline 1 > will be > > missing from the archive. > > What are you planning to do with the archived files? > > Also is not the case that once the primary crashes you are in a split > brain case and can't really trust it's timeline anymore? > > > > Is there a good solution to prevent this situation? > > > > Regards, > > Pixian Shi > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com