Re: Trying to break online checksums with LLMs

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Trying to break online checksums with LLMs
Date: 2026-11-30 21:52:39
Message-ID: 3ed1ca68-7409-4170-8a99-32e1704ff4aa@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While working on the "Interrupts vs signals" patch, my AI review also
flagged this one pre-existing issue:

On 09/09/2026 00:38, Daniel Gustafsson wrote:
> * A registered worker can outlive a terminated launcher: Relation I/O and
> full-page-image WAL can begin after `SHOW data_checksums` reports `off` and the
> launcher has exited
> - This requires termination within a very tight window, and cannot lead to
> wrong results or corruption. Will look at a fix.

That's pretty harmless, but there's also a simple fix: increment the
"invocation number" when the launcher exits. That way, the worker will
quickly see that the invocation number doesn't match and exit, even if
the launcher fails to signal it.

Attached patch 0001 implements that. Patch 0002 is an AI generated test
case to demonstrate the issue. It's pretty artificial, and the
consequence is very minor so the test doesn't seem worth committing. But
any thoughts on patch 0001?

- Heikki

Attachment Content-Type Size
0001-Bump-data-checksums-invocation-counter-when-launcher.patch text/x-patch 1.9 KB
0002-Add-test-for-data-checksums-worker-outliving-the-lau.patch text/x-patch 3.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2026-11-30 22:16:13 Re: pg_upgrade's get_rel_infos_query() query can sometimes be slow
Previous Message Ayoub Kazar 2026-11-30 21:47:21 Re: Simplify the uniqueness proof for self-join elimination