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.98.2) (envelope-from ) id 1xSDUd-00000001fNn-0cuU for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Nov 2026 13:08:31 +0000 Received: from localhost ([127.0.0.1]:60922 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xSDUb-0000000DTNu-06s6 for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Nov 2026 13:08:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:48576) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xSDUa-0000000DTNl-2xzd for pgsql-hackers@lists.postgresql.org; Sat, 14 Nov 2026 13:08:28 +0000 Received: from mail-wm2-x0b.google.com ([2a00:1450:4864:31::b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xSDUZ-00000000ui3-0NNr for pgsql-hackers@lists.postgresql.org; Sat, 14 Nov 2026 13:08:27 +0000 Received: by mail-wm2-x0b.google.com with SMTP id 5b1f17b1804b1-49814d35686so1202635e9.0 for ; Sat, 14 Nov 2026 05:08:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794661704; x=1795266504; darn=lists.postgresql.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=70Mv/FLD0f3M1htnwb7iQOfqkpw4pf0bqtxyaFTNcRo=; b=nL2HtXDi7387RUscE0W6CgMIoM7SGgYkPdhLuh3kxKZdR5ZhjLsOx5BtHkTN234vSo X7EJOCE4b/5a7XNvsP0qo8lLzebrv0Phhfs/edGn6b3jZTW1W/zWE1wQ5nCdQflGnLly wXywetPiWknyBveGKEX1U3XDOv2LQe+cjHK+9Bg6gTS2CQkhJCgOLpJniPvP12lKUvc/ xrCTvc92CT2+SCSMq7X5YCocAGZO4V0+LJF3D4rB5q6OLnqd9W0M7AvRIKKXFZnSpYnQ UHmHHbkUtfojw/dX7Mo74FYZM2qpLOH4/QQ6K3Iz/1rWeravWNl9/Kui+LIMn+Mod+Rc zi9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794661704; x=1795266504; h=content-transfer-encoding:content-type:in-reply-to:from: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=70Mv/FLD0f3M1htnwb7iQOfqkpw4pf0bqtxyaFTNcRo=; b=NeeXFgN1iZ6+1pA3J08Y98WGha7+Fc1pHzhHRADdvEkYYismscQF5X0z9KIlhIe7E5 N2Lw2n2xxuaeZTQRqx5ezMFILEf3ZCofllT7KlFH18M/v+ANewHc3nPiR16jCLQ4YxIG rhAZ3D5VhsfmPNpcXVs6ewHpHGM9dqAFD1Pn7OCarNZYobaWir7W0SGaQtHyLIF74nN0 trtmDv5DR/1yF3fR12Ao2iI0ZkHMMUgO7jGFkXhOrRUWc5BL8VHnUptKJOFxCjY99bTk 50vsDHiR8XrtfRKFwEorTuBlom1UHBBT4+VQHx7YPNj2L5ILgwNpUGQkA0rnNRIP0XjP IcCQ== X-Forwarded-Encrypted: i=1; AL+hErF4uQIlpFZhSrS8CtrKr7qsnLhTPzNxQY070d5X0y88xrTchGPrme5xqJZOY7imjt9lw4MjU9cgakUnwOz1@lists.postgresql.org X-Gm-Message-State: APuU4Z8aXOsQdQk3SbIMnbWgzzI5HifhFLxz67zzakScuZEcTZEs27b/ 80qZ2UlGDJlD54XcYe8pKkmNw1b28mzvAppO3yOkBLnP5fZNBPIY7z/k X-Gm-Gg: AYBFou3wzctULql68a2qowVDs7mxFJFqrOyoXo9Mch6eFHzQW7EdFlRN1CybyZb+avU m+L9spG+dVst9yS1MfDsHG8EQPro4lKUw52+wt+0zTQ4vJyv9KgBxhwnc9kwvVotQkA6DpfWDui Py42qaEEVLQ6xlLARNQMWL3KFz6ULOYo8aAo20Fsw0ykcWThucodyd1vJZMRZ6LMW42c113Ervu sbwyhFlb2Q0u7oPEg7YWGV7ZodROWGEaZcDtnC7XJZ3114Yx/bZ1r7mKk7ryiZeVO3j8KzMcXrl nIGGmPvBpUj7LJ+GqDVNNrJXoY4ABWUooHNc56+jDSdksUz7m4qHfqPmrp7TRozK1H1476cLZmW 1nPEMU4N9JSFKjkCFmiVxGNoQaKWSJuYz+Am9QMBu+/0pNlbs1yffM1XdFYSmL2LOMOFSfF0uAJ l0ep6q7llDhXZZ2Blv7BcenKi5llJgc4JCCriXX4D3kse8bCgGRMQAU0K9OF2lyYT7lMbDd780G brjmctzAJHyux7Kau5AaIc2+73JKkZR05wY918oN6X42/OQM2iqyKJrtNXeHJ7ysHajzYbG4100 tO8uWXVH4WhBJ02t1NhrgqCKDe8ACvtgmMdoAlgxDuga1e7ld6/FtqPQAUtcEjzOF8ETVwNndOI kF3uwqvqBRi+xtfwBJVSjlggp9eMcoZpAY/2xXpwE4jTVzC++Ns8D8Ig8PDAT X-Received: by 2002:a05:600c:34d6:b0:4a2:526b:d40f with SMTP id 5b1f17b1804b1-4bb5599801dmr116112495e9.0.1794661704450; Sat, 14 Nov 2026 05:08:24 -0800 (PST) Received: from ?IPV6:2a01:b740:13c2::f0? ([2a01:b740:13c2::f0]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb55ae4414sm142817145e9.9.2026.11.14.05.08.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Nov 2026 05:08:24 -0800 (PST) Message-ID: <6e62d593-a8b2-415d-834d-e54ed519bb04@gmail.com> Date: Sat, 14 Nov 2026 21:08:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: WAL_LOG CREATE DATABASE strategy broken for non-standard page layouts To: Melanie Plageman , Robert Haas Cc: Michael Paquier , Rogers Wang , pgsql-hackers@lists.postgresql.org, Matthias van de Meent , =?UTF-8?Q?=C3=81lvaro_Herrera?= , Andres Freund References: <202602021525.qv4m7oge4eca@alvherre.pgsql> From: Zhijie Hou 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 Hi, On Wed, Nov11, 2026 at 06:10 AM Melanie Plageman wrote: > > Attached v2 uses a hybrid approach that passes page_std for heap > tables and btree indexes as well as when the data between pd_upper and > pd_lower is all zeroes. That allows other AMs to zero out that area if > they want to preserve the old behavior and avoid a regression (which I > think was what you were suggesting). While analyzing an issue related to the visibility map, I reviewed the 0001 patch a bit. The fix looks good to me. I just have one minor comment on the TAP test in 0001. IIUC, the pre-existing test in 034_create_database.pl was added by commit 8a8661828ae to verify that when CREATE DATABASE loads the template's pg_class into shared_buffers, it marks those buffers as permanent so that a subsequent checkpoint flushes them to disk. But with 0001, the modified test vacuuming tab_db_before_create_1 in template1 beforehand loads template1's pg_class into shared_buffers with BM_PERMANENT already set before CREATE DATABASE runs. If we want to keep the original regression coverage, maybe we could run the new test steps after the pre-existing test. -- Best Regards, Zhijie Hou