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 1wu19O-000Q5Z-2G for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2026 05:05:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wu19M-005Vlh-1P for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2026 05:05:13 +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 1wu19M-005VlZ-0T for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2026 05:05:13 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wu19L-00000000DjG-1LlK for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2026 05:05:12 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-6a15d54ac95so960480a12.0 for ; Tue, 11 Aug 2026 22:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786511108; x=1787115908; 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=XI+zX7dzgt9/iTZ4lfo1imGipwv61OKa1sO8ar7GXVE=; b=rDT+FWGNaQ6Ft2SUP3toKLYBtf9ubRoHpViCS6Jcxp58kcwVOH2TGXdVFDmJ3smnQs +IS8GMdymIb8B6mIt3grFJqS8oPtMIqkdrcefCjhOGzI8CDMirwjhT7CsluK56W/XDgB pjZGw4PXUUW+xPP8CYD1ma3sJlXR5aTwRft6PrS9bBbJU3/3bS1u1s86SB2VnlHJnkKA b5jzIbKcIRcSWYXkfXp+LySunliw1HL8+PfhBuBwcS+hG6WhW6h/BwH6dw9laxi3pRD4 rAOHmckuwO3EeA3DbtOC9Q19lBUVZF8GC5tl5Qr/ExHsQt4hX1JkvHVIE8G/YmnP08gJ ebyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786511108; x=1787115908; 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=XI+zX7dzgt9/iTZ4lfo1imGipwv61OKa1sO8ar7GXVE=; b=kRkDPDsZkfEL6MfqklLby4Zojhe0ZaIuWPbYM7/o/bYxJ+PXeleV38Ttg4RgN2pYF4 PNQrda21l6AmQD/jKtc3SwgzWluK0wcQFUUvA1bFsadhOzeJlveYtRAyb+yC1qIyeZfU lJLJc/YRvbaTzLa3NEh6cUsQaBYGaNZ9przdsVhSWNivrqwxG9Cl4xDAdb0G3OmVVz47 DSkfxf2MJlVDmIx5PY4VnslySim5l+NK125/oCWBmVI7mpOysxmhUxd6oNmuiq9YpisC 4VS4pq53OYxwUYiEm2OzFMV+23DmVmU3WTWHChqHF8+4vZRahgtnkSJAkh1n3gV4Sydk s8dA== X-Forwarded-Encrypted: i=1; AHgh+RqvCzmqntAN3i5/9kvJiTWJQdgdLeXwIh/2eSv6Fgo/mVcvBYQTZAly6+ZSiWll5V6+zNnAA0FiAfqlB24O@lists.postgresql.org X-Gm-Message-State: AOJu0Yyz7TmAjJbl1MaIyeJ7e5xNRl5mhkbvVtYSO/EPw+smlYk51aw6 U/Uzw5N0iTC2TY9eCb67K3RjDivCI65v3gcBGgeyB3arRLC5u8siEnub X-Gm-Gg: AR+sD11uTlx1ZF33QtWvWOkCdy3bhLX38dw2iSHbX5wC7na3xxWGw09KVKmM+Qfel84 yWUd7pc7WgxWRc+UjvcSiKGEDAHtqsgjTh6/KqQUVADulImTI4nYbCkxO4x44MtjRDiWf8gcV7D 5FUiA4shay4okGMMtWQH1BSIywQqfJh7gOCgUSLZZ9Klfm4/NfXhN6pe9x+yWIarQrS9M+INM19 dFAPxG/EIyU2t0SST3xDDNr12/8wxD5nTC/OXkcnu4aeKD8kgFdMS0UnBGRkJ11Ld2EwQohyHkX gJowPH4u7by5MCOtp8Nrkb++CggOxV3+8dVYCISsziE/gTfT8qk7W4i696zBzr4bfSIdaEb8Yo8 BftFLbsE/bej77V/CsUtuZoLRAKZqa9rHeWjzD0tNodxv+i598ahFiLacD/MKsChvX6fM3XNSGw ZX3yDOxVRK3488p2b9SdXu86F3vxQ34uJ7E+QHG/tcXrQTMzwLBR8w6EgjNwcfOuog82l6bxCFy GNkZE6f1VB7dAqdfPvbw80PA/+gmkU= X-Received: by 2002:a05:6402:450a:b0:6a1:fec6:3307 with SMTP id 4fb4d7f45d1cf-6a375ec56dfmr793627a12.7.1786511108215; Tue, 11 Aug 2026 22:05:08 -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 4fb4d7f45d1cf-6a376a0fb5csm224614a12.24.2026.08.11.22.05.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2026 22:05:07 -0700 (PDT) Message-ID: <8cb012f7-1058-41ee-a727-90f3ecbecb58@gmail.com> Date: Wed, 12 Aug 2026 07:05:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_rewind does not rewind diverging timelines To: Kyotaro Horiguchi , japinli@hotmail.com Cc: 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: <20260601.153058.2271004477925758292.horikyota.ntt@gmail.com> 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 6/1/26 08:30, Kyotaro Horiguchi wrote: > Sorry, I only just noticed this thread. > > I may be missing something, but UUID feels somewhat heavyweight to me > for this problem. > > 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. Unfortunately, I do not think that will work. For the normally problematic case, the two competing TLIs will have the same history. I added extra tests to support a divergence further back, but I find this a rare case. > 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. Well, although they are written to the file, the normal TLI is just an extra defense, not a replacement for the TLI. Best wishes, Mats Kindahl