[PATCH] Remove unused is_error parameter from TeardownHistoricSnapshot()
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:t53462psql -h localhost -U postgresBuilt from patchset v1 (message #1), September 21, 2026 at 01:23 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 t53462_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 t53462_1 && git checkout t53462_1Patchset v1 (message #1) is on t53462_1
Hi hackers,
I found that the is_error parameter of the TeardownHistoricSnapshot() function is not actually used anywhere in the code.
This parameter was introduced in commit
b89e151054a05f0f6d356ca52e3b725dd0505e53 as part of the logical decoding feature, but has never been used. The function just sets two global pointers to NULL regardless of the parameter value.
So I' ve submitted a patch to remove this unused parameter.
Please see the attached patch for details.
Best regards,
Chaoyun
杭州易景数通科技有限公司
慈超云
On 6 Mar 2026, at 08:34, 慈超云 <cichaoyun@halodbtech.com> wrote:
Hi hackers,
I found that the is_error parameter of the TeardownHistoricSnapshot() function is not actually used anywhere in the code.
This parameter was introduced in commit
b89e151054a05f0f6d356ca52e3b725dd0505e53 as part of the logical decoding feature, but has never been used. The function just sets two global pointers to NULL regardless of the parameter value.
It is indeed unused, but given that it exists and the callers set it
appropriately it could be a pretty valuable debugging aid when attaching, or
adding logging, to TeardownHistoricSnapshot. Compilers are smart enough to
take care of this for us so there seems to be little value in removing this
(apart from silencing AI tools but that's not something we optimize for).
--
Daniel Gustafsson