Re: Buffer locking is special (hints, checksums, AIO writes)

From: Andres Freund <andres(at)anarazel(dot)de>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: Buffer locking is special (hints, checksums, AIO writes)
Date: 2025-12-18 23:39:00
Message-ID: ossv2eistssmubfsir6xjll76tynvxv5lup4zkrfzjkud7fycw@rf5vii6l6cha
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2025-12-18 17:06:43 -0500, Andres Freund wrote:
> I'll try to come up with a combined patch that applies the optimizations in
> LWLockWaitListLock() and LockBufHdr() to each other.

Attached is a rebased version of this patch series, with the above patch as
0001.

The later patches have a lot, but not yet all, of Melanie's feedback
addressed. I mainly am sending them because cfbot wanted a rebase anyway.

I'm mainly not yet happy with how 0007 changes buf_internals.h, some more
comment work is also needed. 0009 & 0010 still are more for POC than ready to
be in-depth reviewed.

Greetings,

Andres Freund

Attachment Content-Type Size
v8-0001-bufmgr-Optimize-harmonize-LockBufHdr-LWLockWaitLi.patch text/x-diff 3.7 KB
v8-0002-heapam-Move-logic-to-handle-HEAP_MOVED-into-a-hel.patch text/x-diff 11.1 KB
v8-0003-freespace-Don-t-modify-page-without-any-lock.patch text/x-diff 2.0 KB
v8-0004-heapam-Use-exclusive-lock-on-old-page-in-CLUSTER.patch text/x-diff 2.7 KB
v8-0005-heapam-Add-batch-mode-mvcc-check-and-use-it-in-pa.patch text/x-diff 7.5 KB
v8-0006-bufmgr-Change-BufferDesc.state-to-be-a-64bit-atom.patch text/x-diff 46.6 KB
v8-0007-bufmgr-Implement-buffer-content-locks-independent.patch text/x-diff 44.6 KB
v8-0008-Require-share-exclusive-lock-to-set-hint-bits-and.patch text/x-diff 37.8 KB
v8-0009-WIP-Make-UnlockReleaseBuffer-more-efficient.patch text/x-diff 3.5 KB
v8-0010-WIP-bufmgr-Don-t-copy-pages-while-writing-out.patch text/x-diff 11.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-12-18 23:43:07 Re: Make COPY format extendable: Extract COPY TO format implementations
Previous Message Heikki Linnakangas 2025-12-18 23:30:05 A few patches to clarify snapshot management, part 2