Re: Inval reliability, especially for inplace updates

Noah Misch <noah@leadboat.com>

From: Noah Misch <noah@leadboat.com>
To: Paul A Jungwirth <pj@illuminatedcomputing.com>
Cc: Alexander Lakhin <exclusion@gmail.com>, Nitin Motiani <nitinmotiani@google.com>, Andres Freund <andres@anarazel.de>, Ilyasov Ian <ianilyasov@outlook.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Surya Poondla <s_poondla@apple.com>
Date: 2025-12-17T03:23:57Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Update .abi-compliance-history for PrepareToInvalidateCacheTuple().

  2. Assert lack of hazardous buffer locks before possible catalog read.

  3. For inplace update, send nontransactional invalidations.

  4. Update .abi-compliance-history for CacheInvalidateHeapTupleInplace().

  5. Revisit cosmetics of "For inplace update, send nontransactional invalidations."

  6. Correct comments of "Fix data loss at inplace update after heap_update()".

  7. Move I/O before the index_update_stats() buffer lock region.

  8. Revert "For inplace update, send nontransactional invalidations."

  9. Revert "WAL-log inplace update before revealing it to other sessions."

  10. Fix inplace update buffer self-deadlock.

  11. Remove duplicate words in comments

  12. At end of recovery, reset all sinval-managed caches.

  13. Fix data loss at inplace update after heap_update().

  14. Remove comment about xl_heap_inplace "AT END OF STRUCT".

  15. Reduce memory consumption for pending invalidation messages.

  16. Add support for streaming to built-in logical replication.

  17. WAL Log invalidations at command end with wal_level=logical.

  18. Introduce logical decoding.

  19. Rename and document some invalidation routines to make it clearer that

On Fri, Dec 12, 2025 at 09:48:48AM -0800, Paul A Jungwirth wrote:
> On Thu, Dec 11, 2025 at 4:24 PM Noah Misch <noah@leadboat.com> wrote:
> > On Thu, Dec 04, 2025 at 04:19:02PM -0800, Noah Misch wrote:
> > > Thanks for the review.
> >
> > > The attached version doesn't need a comprehensive re-review, but I'd
> > > particularly value hearing about any places where you find it's reducing
> > > comprehensibility rather than enhancing.
> >
> > I'd like to get this into the back branches well in advance of the 2026-02
> > releases, in case the buildfarm catches some defect at low probability.  If
> > there are no objections in the next week, I'll proceed that way.
> 
> I'm happy with these new comments. The explanation in
> heap_inplace_lock before calling CacheInvalidateHeapTupleInplace is a
> lot better I think. And removing the last param means there is less to
> think about.

I pushed the patch bundle to v17-v14.  Thanks for the reviews!  The
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dragonet&dt=2025-12-17%2001%3A34%3A36
"double free or corruption (!prev)" likely witnessed a defect in how I
back-patched this to v14.  I am looking into it.