[patch] Cache invalidation for I/O Workers
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:t253843psql -h localhost -U postgresBuilt from patchset v3 (message #3), September 20, 2026 at 05:31 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 t253843_3 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 t253843_3 && git checkout t253843_3Patchset v3 (message #3) is on t253843_3
This solves BUG #19622, from pgsql-bugs [1]
With io_method=worker I/O worker processes retain open file descriptors on
relation files that have been dropped.
When dropping a relation, an invalidation message is posted, backends handle it
this patch implements the same pattern in I/O worker, and prevents holding
invalid relations.
That said,
This issue doesn't have observable consequences to the user, and is
currently bound
by `max_files_per_process` (default 1000), after which it forces
closing the least
recently used files, if that parameter does its job, we wouldn't have a crash.
In the theoretical scenario of a relation number being reused it could
attempt to read
from a stale file.
Hi Alexandre,
Thanks for looking into this issue. It seems the patch is missing from the
attachment.
Also, would you mind creating a new entry in commifeast?
Thanks,
Shihao
The forgotten patch
Show quoted text
On Fri, Sep 18, 2026 at 5:59 PM shihao zhong <zhong950419@gmail.com> wrote:
Hi Alexandre,
Thanks for looking into this issue. It seems the patch is missing from the attachment.
Also, would you mind creating a new entry in commifeast?
Thanks,
Shihao