Re: LogwrtResult contended spinlock
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org, Jaime Casanova <jaime.casanova@2ndquadrant.com>
Date: 2022-03-22T01:11:18Z
Lists: pgsql-hackers
Hi, On 2021-11-22 18:56:43 -0300, Alvaro Herrera wrote: > There was an earlier comment by Andres that asyncXactLSN should also be > atomic, to avoid an ugly spinlock interaction with the new atomic-based > logwrtResult. The 0002 here is an attempt at doing that; I found that > it also needed to change WalWriterSleeping to use atomics, to avoid > XLogSetAsyncXactLSN having to grab the spinlock for that. This patch currently doesn't apply: http://cfbot.cputube.org/patch_37_2716.log Are you aiming this for v15? Otherwise I'd like to move the entry to the next CF. Marked as waiting-on-author. Greetings, Andres Freund
Commits
-
Remove bogus assertion in pg_atomic_monotonic_advance_u64
- 768f0c3e21b3 18.0 landed
- 3a9d0d774d90 17.0 landed
-
Add XLogCtl->logInsertResult
- f3ff7bf83bce 17.0 cited
-
Operate XLogCtl->log{Write,Flush}Result with atomics
- ee1cbe806dad 17.0 landed
-
Split XLogCtl->LogwrtResult into separate struct members
- c9920a9068ea 17.0 landed
-
Introduce atomic read/write functions with full barrier semantics.
- bd5132db558b 17.0 cited
-
Reduce the number of GetFlushRecPtr() calls done by walsenders.
- e369f3708636 13.0 cited
-
Remove most volatile qualifiers from xlog.c
- 6ba4ecbf477e 9.5.0 cited