Re: Foreign key isolation tests
Paul A Jungwirth <pj@illuminatedcomputing.com>
From: Paul A Jungwirth <pj@illuminatedcomputing.com>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Rustam ALLAKOV <rustamallakov@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2025-07-18T23:25:54Z
Lists: pgsql-hackers
Attachments
- v3-0001-Fill-testing-gap-for-possible-referential-integri.patch (text/x-patch) patch v3-0001
- v3-0003-Improve-comment-about-snapshot-macros.patch (text/x-patch) patch v3-0003
- v3-0002-Add-test-for-temporal-referential-integrity.patch (text/x-patch) patch v3-0002
On Fri, Jul 18, 2025 at 3:29 AM Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
> I agree that additional testing in this area is valuable. Patch 0001
> looks reasonable to me, on a quick read-through. In patch 0002, I
> think it would be valuable to also test updating the parent row to
> time periods consistent and not consistent with the insert, to confirm
> that that behaves correctly.
Thanks for taking a look! Here are new patches with those extra tests.
There are extensive regress tests already, so I just tested the same
concurrency pattern. I think the results are okay. I do get a
can't-serialize exception for a couple valid changes under REPEATABLE
READ and SERIALIZE, but I think they are expected and not a bug. (I
think you would see the same thing outside of FKs.)
--
Paul ~{:-)
pj@illuminatedcomputing.com
Commits
-
Improve comment about snapshot macros
- 1d5800019f68 19 (unreleased) landed
-
Add test for temporal referential integrity
- e8cec3d1791c 19 (unreleased) landed
-
Fill testing gap for possible referential integrity violation
- a2b4102a21ad 19 (unreleased) landed
-
Simplify COALESCE() with one surviving argument.
- 931766aaec58 19 (unreleased) cited