Commit fb0741a
committed
Assert RI fast-path batches don't span subtransactions
A fast-path batch is filled and flushed within a single trigger-firing
cycle, so all rows in a batch come from the subtransaction that created
the cache entry. AtEOSubXact_RI() relies on this: it identifies an
aborting subtransaction's entries by the subid stamped at entry
creation. Assert the invariant in ri_FastPathBatchAdd() to catch any
future code that would violate it.
Suggested-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/20260705222115.be.noahmisch@microsoft.com
Backpatch-through: 191 parent bfb18f4 commit fb0741a
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2907 | 2907 | | |
2908 | 2908 | | |
2909 | 2909 | | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
2910 | 2918 | | |
2911 | 2919 | | |
2912 | 2920 | | |
| |||
0 commit comments