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 1vjymm-007BX2-1H for pgsql-hackers@arkaria.postgresql.org; Sun, 25 Jan 2026 12:00:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vjyml-004m1F-1Z for pgsql-hackers@arkaria.postgresql.org; Sun, 25 Jan 2026 12:00:07 +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.96) (envelope-from ) id 1vjyml-004m17-0H for pgsql-hackers@lists.postgresql.org; Sun, 25 Jan 2026 12:00:07 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vjymi-00000000N3Q-3jFQ for pgsql-hackers@lists.postgresql.org; Sun, 25 Jan 2026 12:00:07 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-42fb2314f52so1998709f8f.0 for ; Sun, 25 Jan 2026 04:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769342403; x=1769947203; darn=lists.postgresql.org; h=content-transfer-encoding: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; bh=9sO8Ig2+oXL7ote1UuU0DPhuq2p+e0aDiSdY1uz8cOQ=; b=F8kPpUz1gdk5XyGzBaFeX2fS82wrPY3y0kKq2HKHO+p49roWxbmT5nI485mlFE4Cau RwsfWSyMQEsN34cm1BnF6vD6xpdJF4SDQt1+VLR6dnkwgIOOtSt6nOU+mmJP6Y9KNdzf AQc4etQ+9/bQC8kWZyfr8BYxy6t7PMfpV4NZDsHbjPhcb6FkUTSZyWKd6dctIueOFsVh hdbEGC5e61VXMrzl+ZXWa35XLXfVd1BaELXga8PadtyiXnLZX+dBdMDsRJIwC7Z2kpkI /Tt2gLRhRKqvJHh0uIlBoj/TpT/qtCovQ9X0EUbcCg3xPwRzL7Bfnkr6+iISxfjSwE93 lleQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769342403; x=1769947203; h=content-transfer-encoding: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; bh=9sO8Ig2+oXL7ote1UuU0DPhuq2p+e0aDiSdY1uz8cOQ=; b=aHTOX490AHXwqrw40xGtHIhWCNEIgcBsUBvJZhy3OofRWSJ395bxRr46Teq17OVE6v IRiE4rWPKSZm63QgQFHOPK5oo8S/ryNQhpeJC3dS1Nl2PZd5RVSNfQ1L3X6HxPQXV9xV x6hLN3isjgHayn7cbhc0MNyeGWllDh/fYXNcr7GmgN+8J/hNREktjJlTZoFBoEF0x6xm cpjy8OpRcD1g855hIXX3LvSAwDAr8LDezG5X+5RmE5gCvq+oTKHByMF2t2di3DI7OgBT 4pscCBLni0eatpzKWY7jwKE+vIxtuWDQE09AE2J9xWl+UJjwvG9g8sNJmp2LC4XA+oUS wdCA== X-Forwarded-Encrypted: i=1; AJvYcCXGkeLsK49C6bmV/L+bhMz8ZNeowJRG+YzCS6CO68AR9L1oVuY14qrelstyKV9eA5Nk+WN5h5VuwYvqNnvg@lists.postgresql.org X-Gm-Message-State: AOJu0YzhkbaIdQu1UKfY9dV3Yv/ehykVUHEz2LdZ7OVS6NnMlsLjJxK2 0WKGAFI4+utZr9a1VnMcdfKLb/hpTZs3xXUjWAAqvZqpz0oEj9e4Fkdw X-Gm-Gg: AZuq6aJE+W7BJxYsMGTeNTal9oo/V+/XlYtqBA/MRn149MrS/G3ZMN4idKSocRzI9Sf Wtrej9LJkvi84EJ1+OxvdWPHkI9JcbxNOnULGXl103bQOxsTgFqDdOB8UI5tmyp+Iw+z+96/E+q veV92kiF6a/Fb6PblGNhaCD81bvuacUJFGxtNqVwqvkDZNOncaQqRv6RddOeGri3wfpOXI2YBdA T5om2XWBnWUraAjq7K1Lx9nSItXy8CQBSgQ0dX1tKGRLtDGjDvA1LvdC2CUD6DZUTd5l4Wjg0k9 rwlhvfcErQ9iNrKsyIUxtDZPPuWK1F8i0jGCnpo4pdiguuz1LwlBnkIHMkvNWWFGe0rbeQvyrBv AxtVnGHYXSPPxSqJNfJF2h8e3bTirYxlSHBzNKGXvAT0Q7HSK7UExk0L29gHmi3Dp86I0tjY6O6 D2A9OP3W6DgLHH X-Received: by 2002:a05:600c:6812:b0:477:a9e:859a with SMTP id 5b1f17b1804b1-4805cf668f1mr20719485e9.22.1769342403001; Sun, 25 Jan 2026 04:00:03 -0800 (PST) Received: from [192.168.0.50] ([89.149.93.129]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1f745c5sm22106062f8f.32.2026.01.25.04.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Jan 2026 04:00:02 -0800 (PST) Message-ID: <274e0a1a-d7d2-4bc8-8b56-dd09f285715e@gmail.com> Date: Sun, 25 Jan 2026 14:00:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [BUG] [PATCH] pg_basebackup produces wrong incremental files after relation truncation in segmented tables To: Robert Haas , Andrew Dunstan Cc: Amul Sul , pgsql-hackers@lists.postgresql.org, Oleg Tkachenko , Stanislav Bashkyrtsev References: <00FEFC88-EA1D-4271-B38F-EB741733A84A@gmail.com> <22474984-C4CD-4300-A84E-C1CA58F61CDA@gmail.com> <08EA8874-0114-4E5C-A794-EB40C971EE7C@gmail.com> <6897DAF7-B699-41BF-A6FB-B818FCFFD585@gmail.com> <1E2326C0-185A-4D91-867C-18BF94D186DD@gmail.com> Content-Language: en-US From: Alexander Lakhin 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 Hello Robert, 19.01.2026 19:42, Robert Haas wrote: > On Fri, Jan 16, 2026 at 7:10 AM Oleg Tkachenko wrote: >> As you suggested, I've updated the test so that it produces small files consistently across platforms. >> On one specific platform (with segment size = 6 blocks), it still exercises the relevant code path. >> And I've also applied the style changes you mentioned. > Thanks. I have committed the fix and back-patched to v17. I made some > style changes to your test, especially rewriting comments, but the > substance of it is unchanged. As Windows animal fairywren shows at [1],  the test 011_incremental_backup_truncation_block, added by ecd275718, hit Windows limitation to the path length: 126/281 postgresql:pg_combinebackup / pg_combinebackup/011_incremental_backup_truncation_block ERROR            96.71s   (exit status 255 or signal 127 SIGinvalid) log/011_incremental_backup_truncation_block_primary.log contains: ... 2026-01-20 02:11:14.760 UTC [7480:2] [unknown] LOG:  connection authenticated: user="pgrunner" method=trust (C:/tools/xmsys64/home/pgrunner/bf/root/REL_18_STABLE/pgsql.build/testrun/pg_combinebackup/011_incremental_backup_truncation_block/data/t_011_incremental_backup_truncation_block_primary_data/pgdata/pg_hba.conf:117) ... 2026-01-20 02:11:23.506 UTC [1252:3] LOG:  checkpoint starting: immediate force wait 2026-01-20 02:11:23.580 UTC [1252:4] LOG:  checkpoint complete: wrote 5 buffers (3.9%), wrote 1 SLRU buffers; 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.074 s; sync files=0, longest=0.000 s, average=0.000 s; distance=32768 kB, estimate=32768 kB; lsn=0/4000080, redo lsn=0/4000028 2026-01-20 02:11:23.974 UTC [8968:2] ERROR:  could not rename file "pg_wal/summaries/temp.summary" to "pg_wal/summaries/00000001000000000100002800000000010CAA50.summary": No such file or directory         1 file(s) copied. 2026-01-20 02:11:33.645 UTC [7968:14] 011_incremental_backup_truncation_block.pl WARNING:  still waiting for WAL summarization through 0/4000028 after 10 seconds 2026-01-20 02:11:33.645 UTC [7968:15] 011_incremental_backup_truncation_block.pl DETAIL:  Summarization has reached 0/1000000 on disk and 0/10CAA50 in memory. That is, the target filename for the rename operation is: C:/tools/xmsys64/home/pgrunner/bf/root/REL_18_STABLE/pgsql.build/testrun/pg_combinebackup/011_incremental_backup_truncation_block/data/t_011_incremental_backup_truncation_block_primary_data/pgdata/pg_wal/summaries/00000001000000000100002800000000010CAA50.summary I can reproduce this locally with the source tree located at /c/src/postgresql12345678901234567890123456789012345678901. Not reproduced with HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled set to 1. Note that the test passes at the master branch ([2]) because "master" is shorter than "REL_18_STABLE" by 7 chars. See also [3]. [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2026-01-20%2001%3A26%3A02 [2] https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=fairywren&dt=2026-01-24%2010%3A03%3A10&stg=misc-check [3] https://www.postgresql.org/message-id/666ac55b-3400-fb2c-2cea-0281bf36a53c%40dunslane.net Best regards, Alexander