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 1vJtdr-007Gya-0j for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Nov 2025 13:15:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vJtdo-006IzT-2h for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Nov 2025 13:15:04 +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 1vJtdo-006IzL-1Z for pgsql-hackers@lists.postgresql.org; Fri, 14 Nov 2025 13:15:04 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vJtdl-0076RK-2n for pgsql-hackers@lists.postgresql.org; Fri, 14 Nov 2025 13:15:03 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-6419b7b4b80so2853163a12.2 for ; Fri, 14 Nov 2025 05:15:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1763126100; x=1763730900; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Rl2kRUeCVRP6LOV7TbtkOCz7UwrJ5e6ZVYlHPpWpeR8=; b=TBQtBpbdV7rtY7rWXD8/66sxyGH0rHXBYRc/9g+Y4+2X9MGFINDG5xF/c8xP/ughGF Oh+hQ/QagPivUeSO0+nBsoIsH1lWdS2gdwTrHLEszmcenCLp5h8cttkr0MgXjm63bV6s 0l3AgsuG0BXdlqd60d70eBwUmEgTNpJrTTOIxYzv5cYUixtYntpCa/ug2V4pGsgW5Lgy WdCh0T84ohImGjSkZ5fT0s7UdLLRfBxADxQnBvK/S2PUHQYjAAPwMcIDIWHp7spJWZLR ZKQgb6qZVl/wdB+bFMbWwRX5ONnDUO9BVPZ/K9th+fFRYOgtuMm5gj3N4FX9jUtcvJp/ v9ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763126100; x=1763730900; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Rl2kRUeCVRP6LOV7TbtkOCz7UwrJ5e6ZVYlHPpWpeR8=; b=Kas01qMxCDihAp9A3bWJT8+VGMu8P4EV4LuaLiaa8rTMOuQ8XcKeuTl0csIQ5oqXn8 EzVhVoFwgeAqMrn9iqLi9VRSd1NcTj5Mtcd3dIa5Tmhukh8WORQQl/T3X54WcB6KRNWm OtIuciMOAnicQKjWB+cjeDhC+AJpQxyKIxH6QCFPFevNV0WWtkK2GaNMaPbgT6qjgW/x 3pv6bNqQJl5aS/4ZXad+fnE1RwzuZdrLJt2CdyZbGQ2hNhCavu+g3DazOxUid9ZkW8pE 4+grktRfB8LqYV53PwxjibRS/fxqqJJmQITO+rfMl1UyfAQiOvUCyWJQUbiezXWUKHsL /MpA== X-Gm-Message-State: AOJu0YzPtbx04bv6m/s4hIaNYele7Ii92enDZ7qAHvQ6XAwH09f7sWpv yYvV2gf5WAcXVQvofM4xIWuOZC6KIQeBfH1+Q5efUXi7F+wuPFGjEqUYlWZhYFaT7+B20xaJDLd PgbnQD9M1DMrP9xhQmxJ+tqZ6DnCw9vPI0AT3Tkjeev8kO4CydubKczX2MSB5 X-Gm-Gg: ASbGncstAWuZETPfG2l1p3qHaWFUVCFctp/f1P2bI+WYtS6a4vQY81p+/HuAMhbvNRf rQjEFAGEGTFWJk0FQqB8xV35lX9odIdd0BMEdcGUPg/CjVZNi+xiSpR+r5BWYv7pfNz62Hf3jRL evXX6IqNMEB7eGpvxOKSjab/S+c7Hd6K3uvDYa4DW/0aDi4jc73FC/z+Or4vsIR7gnBUUmoxnRT BKh6kLuwAHD16myhil5ssglQoq48inikpL+JyjzaVZxHmjgFMMZjKolMRzUSw== X-Google-Smtp-Source: AGHT+IHCBfuFowWmgoIW61UqNcx3xrA2lomBkpdsMFxquOfNXLcSuzlZKayDOUin3VjdF4R8mYdxo2T/Qr7H3nwGH48= X-Received: by 2002:a05:6402:270e:b0:640:b978:efdb with SMTP id 4fb4d7f45d1cf-64350eab173mr2610190a12.25.1763126100234; Fri, 14 Nov 2025 05:15:00 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ivan Kovmir Date: Fri, 14 Nov 2025 13:15:10 +0000 X-Gm-Features: AWmQ_bkwC_FKvTzX31pGWdOilnbLCJhtyHGpGYfHg1_yWmBONcwJu3vxD4qmWeU Message-ID: Subject: Re: Incorrect checksum in control file with pg_rewind test To: "Maksim.Melnikov" Cc: pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000e6241406438dc87b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e6241406438dc87b Content-Type: text/plain; charset="UTF-8" I can reproduce the bug on the master branch with the following steps: 1. Apply 0001-XXX-Dirty-hack-to-clobber-control-file-for-testing.patch [1] 2. Compile PostgreSQL with `-DEXEC_BACKEND` C compiler flag option. 3. Run `initdb` 4. Run `postgres` 5. Run `pgbench -i` 6. Run `psql -c 'do $$ begin loop perform pg_update_control_file(); end loop; end; $$;'` 7. Run `for run in {1..5000}; do pgbench -c50 -t100 -j6 -S postgres; done` in parallel with the previous command. 8. Wait a while. [1] https://www.postgresql.org/message-id/CA%2BhUKGK-BEe38aKNqHJDQ86LUW-CMwF5F9bo1JtJVg71FoDv_w%40mail.gmail.com --000000000000e6241406438dc87b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I can reproduce the bug on the master branch with the foll= owing steps:

1. Apply 0001-XXX-Dirty-hack-to-clobber-control-file-f= or-testing.patch [1]
2. Compile Po= stgreSQL with `-DEXEC_BACKEND` C compiler flag option.
3. Run `initdb`
4. Run `postgres`
5. Run `pgben= ch -i`
6. Run `psql -c 'do $$ = begin loop perform pg_update_control_file(); end loop; end; $$;'`
7. Run `for run in {1..5000}; do pgbench -c50 -t100 -j6 -S postgres; do= ne` in parallel with the previous command.
8. Wait a while.

[1] https://www.postgres= ql.org/message-id/CA%2BhUKGK-BEe38aKNqHJDQ86LUW-CMwF5F9bo1JtJVg71FoDv_w%40m= ail.gmail.com
--000000000000e6241406438dc87b--