[PATCH] add missed tests for gist index

Started by shihao zhongabout 2 months ago4 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

needs rebasesuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t253687
psql -h localhost -U postgres

Built from patchset v3 (message #3), October 14, 2026 at 10:02 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t253687_3 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t253687_3 && git checkout t253687_3

Patchset v3 (message #3) is on t253687_3

Jump to latest
#1shihao zhong
zhong950419@gmail.com

Hi hackers,

Two test-only patches.

gist.sql vacuums only once after deleting rows, so the emptied leaf pages
are never recycled or reused, and no test deletes every entry. Nothing
replays a GiST page deletion through recovery either.

0001 adds those steps to gist.sql. 0002 adds a recovery test that crashes
and restarts the server after the same workload, with
wal_consistency_checking set. Both compare an index scan against a
sequential scan.

Coverage of src/backend/access/gist goes from 80.3% to 87.9%; the redo side
of gistxlog.c was entirely unexecuted before.

Thanks,
Shihao

Attachments:

t253687_1
llvm-cov-raw.txttext/plain; charset=US-ASCII; name=llvm-cov-raw.txtDownload
0001-Test-GiST-page-recycling-and-deleting-all-entries.patchapplication/octet-stream; name=0001-Test-GiST-page-recycling-and-deleting-all-entries.patchDownload+92-1
0002-Add-a-recovery-test-for-GiST-page-deletion-and-reuse.patchapplication/octet-stream; name=0002-Add-a-recovery-test-for-GiST-page-deletion-and-reuse.patchDownload+100-1
#2shihao zhong
zhong950419@gmail.com
In reply to: shihao zhong (#1)
Re: [PATCH] add missed tests for gist index

Rebase with master

Attachments:

t253687_2
v2-0002-Add-a-recovery-test-for-GiST-page-deletion-and-re.patchapplication/octet-stream; name=v2-0002-Add-a-recovery-test-for-GiST-page-deletion-and-re.patchDownload+100-1
v2-0001-Test-GiST-page-recycling-and-deleting-all-entries.patchapplication/octet-stream; name=v2-0001-Test-GiST-page-recycling-and-deleting-all-entries.patchDownload+92-1
#3shihao zhong
zhong950419@gmail.com
In reply to: shihao zhong (#2)
Re: [PATCH] add missed tests for gist index

Rebase this patch with master.

Attachments:

t253687_3
v3-0002-Add-a-recovery-test-for-GiST-page-deletion-and-re.patchapplication/octet-stream; name=v3-0002-Add-a-recovery-test-for-GiST-page-deletion-and-re.patchDownload+100-1
v3-0001-Test-GiST-page-recycling-and-deleting-all-entries.patchapplication/octet-stream; name=v3-0001-Test-GiST-page-recycling-and-deleting-all-entries.patchDownload+92-1
#4Sho Ito
i.sho.0628@gmail.com
In reply to: shihao zhong (#3)
Re: [PATCH] add missed tests for gist index

On Thu, Oct 8, 2026 at 11:41 PM shihao zhong <zhong950419@gmail.com> wrote:

Rebase this patch with master.

Hi Shihao,

I reviewed v3 on current master. The gist regression test
passes, and the new recovery TAP test passes.

Thanks,
Sho Ito

--
=======================================
*Sho Ito (Sean)*

E-mail: i.sho.0628@gmail.com
LinkedIn: *https://www.linkedin.com/in/sho-ito-0628/
<https://www.linkedin.com/in/sho-ito-0628/&gt;*
GitHub: https://github.com/sean0628/
=======================================