pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Zhijie Hou <houzhijie22@gmail.com>
To: Melanie Plageman <melanieplageman@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Rogers Wang <rogers.ww@qq.com>
Cc: pgsql-hackers@lists.postgresql.org, Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: WAL_LOG CREATE DATABASE strategy broken for non-standard page layouts
Date: Sat, 14 Nov 2026 21:08:18 +0800
Message-ID: <6e62d593-a8b2-415d-834d-e54ed519bb04@gmail.com> (raw)
In-Reply-To: <CAAKRu_b9r-Pz9gzYvC+5EHnXqNgfsJhcH=huUGbXzvcnbHtxCg@mail.gmail.com>
References: <202602021525.qv4m7oge4eca@alvherre.pgsql>
	<tencent_2E870046716FD94285045E96505A2D4E2908@qq.com>
	<apUTKUUvYfG3SlBF@paquier.xyz>
	<CAAKRu_YE-T_qObGxn5gC-b27umwCMGKP40eaOKhVAbTJ9rJhXQ@mail.gmail.com>
	<CA+TgmobaT5h77ZUheD7uoDcK+vRj63Eaa9q8muo8RtqdfctLog@mail.gmail.com>
	<CAAKRu_ZxxVLPfpZiX4L+QURW6HO60v8mFSRn64zado4kzygt5w@mail.gmail.com>
	<CAAKRu_ZK6ihUvzFL8Uie2QNdGSbhAD8TemUPoURxsXk48ospgA@mail.gmail.com>
	<CA+TgmobaoRn6AEEv19Ri1BbMyUS0aOMNdcAOzShDn2JW8sq21w@mail.gmail.com>
	<CAAKRu_b9r-Pz9gzYvC+5EHnXqNgfsJhcH=huUGbXzvcnbHtxCg@mail.gmail.com>

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






view thread (30+ messages)  latest in thread

Message-ID: <6e62d593-a8b2-415d-834d-e54ed519bb04@gmail.com>
Permalink:  ../6e62d593-a8b2-415d-834d-e54ed519bb04@gmail.com/
Also on:    postgresql.org/message-id/6e62d593-a8b2-415d-834d-e54ed519bb04@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: houzhijie22@gmail.com, melanieplageman@gmail.com, robertmhaas@gmail.com, michael@paquier.xyz, rogers.ww@qq.com, boekewurm+postgres@gmail.com, alvherre@kurilemu.de, andres@anarazel.de
  Subject: Re: WAL_LOG CREATE DATABASE strategy broken for non-standard page layouts
  In-Reply-To: <6e62d593-a8b2-415d-834d-e54ed519bb04@gmail.com>
  References: <202602021525.qv4m7oge4eca@alvherre.pgsql> <tencent_2E870046716FD94285045E96505A2D4E2908@qq.com> <apUTKUUvYfG3SlBF@paquier.xyz> <CAAKRu_YE-T_qObGxn5gC-b27umwCMGKP40eaOKhVAbTJ9rJhXQ@mail.gmail.com> <CA+TgmobaT5h77ZUheD7uoDcK+vRj63Eaa9q8muo8RtqdfctLog@mail.gmail.com> <CAAKRu_ZxxVLPfpZiX4L+QURW6HO60v8mFSRn64zado4kzygt5w@mail.gmail.com> <CAAKRu_ZK6ihUvzFL8Uie2QNdGSbhAD8TemUPoURxsXk48ospgA@mail.gmail.com> <CA+TgmobaoRn6AEEv19Ri1BbMyUS0aOMNdcAOzShDn2JW8sq21w@mail.gmail.com> <CAAKRu_b9r-Pz9gzYvC+5EHnXqNgfsJhcH=huUGbXzvcnbHtxCg@mail.gmail.com> <6e62d593-a8b2-415d-834d-e54ed519bb04@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox