Index skip-merge scan
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.
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:t253339psql -h localhost -U postgresBuilt from patchset v1 (message #1), August 25, 2026 at 01:38 PM.
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 t253339_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t253339_1 && git checkout t253339_1Patchset v1 (message #1) is on t253339_1
This patch aims to support the execution of a specific query pattern
without requiring a sort (and potentially some temporary files).
I can quote Ants Aasma <ants(dot)aasma(at)cybertec(dot)at> [1]/messages/by-id/CANwKhkNd85u+4joaKR3YHoDOQSMg5SmJmsYJGo-tMyW=XVXTew@mail.gmail.com
Think of the social media timeline, showing posts from
all followed accounts in timestamp order, returned in reasonably sized
batches.
I tried this before as an access method, and now I am going the easy way by
doing a plan transformation. Since skip-scan is implemented directly as a
feature of nbtree access method [2]https://github.com/postgres/postgres/commit/92fe23d93, my best shot was to use the same
approach and implement this feature as an access method [3]/messages/by-id/AS1PR02MB784695AFEC37179FFAF7EAE19A9DA@AS1PR02MB7846.eurprd02.prod.outlook.com.
I am glad the idea got some traction, but some questions related to how to
cost it properly can be hard, and to be honest, that patch was
uncomfortably large, this patch runs index scans through Merge Append,
which as pointed out in previous discussions [4]/messages/by-id/CANwKhkNd85u+4joaKR3YHoDOQSMg5SmJmsYJGo-tMyW=XVXTew@mail.gmail.com, produces the same results.
Kind Regards,
Alexandre
---
[1]: /messages/by-id/CANwKhkNd85u+4joaKR3YHoDOQSMg5SmJmsYJGo-tMyW=XVXTew@mail.gmail.com
/messages/by-id/CANwKhkNd85u+4joaKR3YHoDOQSMg5SmJmsYJGo-tMyW=XVXTew@mail.gmail.com
[2]: https://github.com/postgres/postgres/commit/92fe23d93
[3]: /messages/by-id/AS1PR02MB784695AFEC37179FFAF7EAE19A9DA@AS1PR02MB7846.eurprd02.prod.outlook.com
/messages/by-id/AS1PR02MB784695AFEC37179FFAF7EAE19A9DA@AS1PR02MB7846.eurprd02.prod.outlook.com
[4]: /messages/by-id/CANwKhkNd85u+4joaKR3YHoDOQSMg5SmJmsYJGo-tMyW=XVXTew@mail.gmail.com
/messages/by-id/CANwKhkNd85u+4joaKR3YHoDOQSMg5SmJmsYJGo-tMyW=XVXTew@mail.gmail.com