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 1wu2Wj-000Qwo-13 for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2026 06:33:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wu2Wh-005jRY-0a for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2026 06:33:24 +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 1wu2Wg-005jRQ-2v for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2026 06:33:24 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wu2Wg-00000000EIn-1lFz for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2026 06:33:23 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-c1f5208b38dso109943866b.0 for ; Tue, 11 Aug 2026 23:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786516401; x=1787121201; 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=+i/IJFuboyl8loLhDnXlF9ogqwLxaRVg3ixaFRAYUKs=; b=oaxEljckK/jeu2YVXZIKJio9e93B3U+bJL850ljdQ1AbRsOBpIdU2YnDq/ldH7DwBA GN3CWJbKFji1PjFXjtCLOBhk3NneTGRpRUnZ33srK6yB/Sw66AsFst7PQUbpzWa1sVJ7 AAzNKP7Y94NT8Kg6VHicdz+q6FWwVyNucDLPdwThWxJOa/hw0cWDDDxOsknNGXDPsorK b+mSREw8GFPI8NIBJ45ZNteemwpUm9utI1l6bzNbqTLuYcgX8DRCp4APicPYdoNXdVoV gQK/NCZXlGyLK62E5SjQTnKpwzULaAJWvluD8YF9bGq3lQGx7MqhtfdtNOfn2CLxw8v5 l/rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786516401; x=1787121201; 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=+i/IJFuboyl8loLhDnXlF9ogqwLxaRVg3ixaFRAYUKs=; b=b5JrJ5oqUzZLMaApMPWMmRPaA5PSBf4wOkTJc6qH8VOsQia90DMGVJUNGJ33xjDf7v kuUl/w1byp4qJi9X5IAeW78PiITlMv4o1hVR7TXqCN4ckhWbc+rBRbWQlHdQcLzkrntU b5B99sx9WnU4PtuynyxE6ur34uiH7EolE1m5K6ZnsBihKbd8Kn892b18WDbAiHqG+PbK 3oy52dGowfWMbjxcNTHAke0quCCiOsWsrf3RyIV8g3QP119nGtAH5Ny2xc0UqnT119by F0VDA5DextZtoKoui3LqOFsBY8sYPlMasaNtQ+4nRNPDYxminRzycLuC4b5JSgVJMCWk 8I1Q== X-Forwarded-Encrypted: i=1; AHgh+RrSH0R0G6cWcSqULK35GBCbt6GuQXVRmMNgEeRkGZ/3HO4nQISY1/8EOK6SAobK+/W1r5kVxd4TZNMIFg5T@lists.postgresql.org X-Gm-Message-State: AOJu0YxHmN3/xW8Ix9A2esGZ5iPOUV9FDezMHTi9E1cCDrfgMMnh/NEl sQuKxrqBCoIIfQ59RgLNut83xIeqR1wEtpKdXyCuzyZj7Grli1byvNQ5 X-Gm-Gg: AR+sD138+auhaGFYgPaO/DMJM4hhYMduUvappvmZJxbqKIl+kQDAFabF5FvzMCbOCxs oRgP/O5nBdpNUWZULeqSY5vkRSgDStDu8bgXRZZxZLELsxqpJST2E7X9MbSCIczuStfXuG9/H49 7NaMdQJKvNf51/xxS7W9fVhCvCZ2u+tpYBjYSrE65BR1SQhgjbxZZokp6nCBphghWs8O5fkCWV0 yd/J6asxf4LxgeDuhCU67aHnbCnGwoQQyKNKmoNqPPgfvGRydhBf4iP/tJuSTyLSRHYZWdtXJX8 lkmYidX5VU+bXrc8OamHF0PijFCIhbRZXqidl+SWXk+dqRGDInT6jeNJ+5GwPpaXqXO4VI/qImr zQvGe4wlbefwGRwfRQXzsxut8K84S+dJKASmN71E2N69uj1WCvacNU/Pn9WzcIxUGErQiHqvepD hFG2W0z1rqZcbnJIyERYxhP5+3slXi5z1CqjCaJJLlby5MzmaT+do1/t5cP4Psf/AzJknX4PiLK 4V21q6PnTmKINF9i4tEhstMDYk+3UY= X-Received: by 2002:a17:907:e1c8:10b0:c16:5f28:4575 with SMTP id a640c23a62f3a-c20f30ffbfamr78621066b.31.1786516400621; Tue, 11 Aug 2026 23:33:20 -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-c20f0ad017bsm54395766b.44.2026.08.11.23.33.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2026 23:33:20 -0700 (PDT) Message-ID: <0bf0971a-d72d-436e-b8aa-b34abdb1c3de@gmail.com> Date: Wed, 12 Aug 2026 08:33:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_rewind does not rewind diverging timelines To: Andreas Karlsson , 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> <49b84ecf-21a2-4e2b-ab66-fbba8ee6540e@proxel.se> Content-Language: en-US From: Mats Kindahl In-Reply-To: <49b84ecf-21a2-4e2b-ab66-fbba8ee6540e@proxel.se> 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 7/29/26 14:55, Andreas Karlsson wrote: > 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. > > As Ants said, the LSN can easily be the same in both. > >>> 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.  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. > > Having had to debug issues with pg_rewind and timelines in our > Kubernetes Operator these UUIDs would probably have helped me a lot. > Maybe the proposed fix is wrong (maybe like Ants says it does not got > far enough) but from personal experience I disagree with that there is > no problem here. > > I will try to find time to play around with the patch and see if it > would have helped us. Thanks Andreas, I would love to hear if this would have been a help in those scenarios. Best wishes, Mats Kindahl, Multigres team, Supabase