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.96) (envelope-from ) id 1wu2ES-000Qeo-1N for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2026 06:14:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wu2EQ-005fHm-0E for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2026 06:14:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wu2EP-005fHe-2Z for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2026 06:14:30 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wu2EP-00000000EAT-0fQl for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2026 06:14:30 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-c15f020a223so71021666b.1 for ; Tue, 11 Aug 2026 23:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786515267; x=1787120067; darn=lists.postgresql.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JMj5vwCsw7L+ux3ZHzFFqun81/FAShnl/I73wurA17U=; b=mRBseqPL27DXg1oDNRct6TNylRSe11Zq24RSbwpPWevgX2xjBnUZt892XFb/Z6QNeF eBd5qBrBUsmOlW4tXodXpcT4ojo+0lF00nQq08seWDd3ehFNTepO5xr2WybOCRFl7kHA aG2pMWHwoRJyMoZ38CCYxx/j1xHbog+dVAVRl25pC0aOVti7VjqCcRur9HrYXNDmKp/z Zi2gMx5vrxiIwH/tQYwx40dmtoHe9ihsi/XsAbrtX/4cAgH5b41+kXY/2XowhacKifTt 6tvNYn4A2GBugBKgoYc7C6NHoBVtsiauQYIB7CNoKlI/1YpXles6UmsgH+Un4YUxLRUG IxBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786515267; x=1787120067; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JMj5vwCsw7L+ux3ZHzFFqun81/FAShnl/I73wurA17U=; b=E7JwGHV/7xfPXHkTwsjQ3QP1fCWvmQEtFf/eXnf1aq7mMGpiqe8hb4JPhjKd3uC/04 eErgVVjFWaX/BUvqoOZgXY/q5zmjE8AgGa6X38nPMVHF8eFsLAGmPG10IoFGZFJoomf7 oX1guKd/UEDjN8On01PnbmhnBGTXZSH566Xh+j4HiWA7jSAasrymSiVklgZJoN0Bb5lg 8e6bys6WuOvEPRQAIFKPj4OI0w2jqNRpxm+Ssw7FDD9hMbTR/S0v7GxJ8FqbS+OMDdFP //CwmBNL+cBMwRWkYJGLA6C+EzprfcKRb5wT3RVXlGJ9cyir/N9yUqzPUW5nj0t2E9f8 /JCA== X-Forwarded-Encrypted: i=1; AHgh+RpweURgsFrNx5z4TTm3oothS813UF1Kh4SK1ROMd5qMArfKwMNb2uYJP+Igqe7UkRq01bJZxvaEnmBcNs7f@lists.postgresql.org X-Gm-Message-State: AOJu0YwVLzVhINhB8PtIFUv/Gj+jYDVNDNST5w7JMGhtIXqTJTXxA0GY flGW5dV7Q1ECoIs0WJC0L/I4aNWeBifArTRVVVJUxPOcj2hFJiP/y/Eq X-Gm-Gg: AR+sD12tfwQgZF4g2a3Jcxe7mWOO4258CongpYFOcy6XQ9wavZRrcEgkeqGOp6K/Xwg ZUWXdlrV4osCPgRL2LzHmTMUx4qExgSYhkGzA/xV0/7M8HGF3mzmsERstfa8uFE3K/BXY57MCdJ IDQ33vpEaybfX2KQAqTt6DpqlkvdSOZ/KXJ7m4DHcvipIFdqLkO9akZcptTZZajNInJg6oZBfq6 bT972nda3N1rFjrdZSabJPJFmo8lHViaanSb6AcIOuYiqA54PIulcfwLI6tZchVXTOzygxTi1SC DpNcFPn/OglcwgehHoK0L1BHH8Kmlz9OdnX7YBee6IfE4aVja1r+IHKiWH+A4HEfDJlxk+AvUI9 kxBVYPELtW1mVBqUWWuojjbLurgwlxw9u/SGZD3MGFfqlHNEnmCb46SiGTVRqrRYYpSq+4jhPVN VMI84zVGU7wZBmNUhx8BtUobb5w6y6TBgK7KvqOLB971h10vb2d06zK0SroiyXP7NGvAbnZXu6V tceLK0a/4v/zcqhy+JwjvANEQ3axcgFbuXKyVUWcdA= X-Received: by 2002:a17:906:6a29:b0:c12:7ab4:637a with SMTP id a640c23a62f3a-c20f2fa0efcmr102360866b.16.1786515266406; Tue, 11 Aug 2026 23:14:26 -0700 (PDT) Received: from [192.168.0.161] (c151-177-23-39.bredband.tele2.se. [151.177.23.39]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c20f0a97bd8sm52829566b.39.2026.08.11.23.14.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2026 23:14:25 -0700 (PDT) Message-ID: Date: Wed, 12 Aug 2026 08:14:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_rewind does not rewind diverging timelines To: Michael Paquier , Kyotaro Horiguchi Cc: japinli@hotmail.com, suryapoondla4@gmail.com, pgsql-hackers@lists.postgresql.org References: <9ce0d2b9-7a41-4a8a-b299-da295bb4514f@gmail.com> <20260601.153058.2271004477925758292.horikyota.ntt@gmail.com> Content-Language: en-US From: Mats Kindahl In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/27/26 01:36, Michael Paquier wrote: > On Mon, Jun 01, 2026 at 03:30:58PM +0900, Kyotaro Horiguchi wrote: >> I wonder whether strengthening the history-based matching would be >> sufficient instead. If timelines with the same TLI but different >> histories can be treated as distinct and pg_rewind continues walking >> the history chain until it finds a common ancestor, that seems like a >> fairly natural fit with the existing timeline model. > Yeah, perhaps there is something that we could do here better in > pg_rewind in terms of TLI history. A second software layer to ensure > TLI unicity feels just like a shortcut: we already have a LSN. > >> UUIDs would certainly make identification straightforward, although >> they would also introduce longer identifiers that are a bit less >> convenient for humans to work with. My initial thought is that it may >> be worth exploring how far we can get with the existing history >> information before introducing a new identifier. > This. For this reason, I am not convinced that this proposal is > neither acceptable or something that we need to do at all. > > Why should we bear the burden of introducing a second level of > timeline identification knowing that by design we have to rely on a > *single* archive location for a new timeline selection when a standby > is triggered for promotion? My opinion is that this is trying to fix > a problem for something that it not actually a problem. If you play > with HA scenarios where there is a risk of two standbys reusing the > same timeline number, just don't do that. Even with a shared archive, it is impossible to ensure such things. It is a normal consensus problem, and there are just to many ways that it can go wrong. I think the UUID should not be looked on as a replacement for the TLI but rather as an an extra protection against problems. It will ensure that we cannot even accidentally pick the wrong "version" of the timeline, but keep the simplicity of using TLI for anything else. > We've historically claimed > that the archive strategy is wrong if your deployments cannot > guarantee a unique TLI assignment. A new sub-identification system > will not provide more guarantees. It will serve as an extra check to ensure that you do not pick the wrong version of a timeline, similar to how checksums ensure that you are not using a page that is corrupt. Best wishes, Mats Kindahl, Multigres team, Supabase