Re: LogwrtResult contended spinlock
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Tom Lane
<tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>,
pgsql-hackers@lists.postgresql.org, Jaime Casanova
<jcasanov@systemguards.com.ec>
Date: 2024-04-08T16:13:22Z
Lists: pgsql-hackers
On Mon, 2024-04-08 at 10:24 +0200, Alvaro Herrera wrote: > My trouble with the "copy" term is that we don't use that term > anywhere > in relation to WAL. I got the term from CopyXLogRecordToWAL(). > This "copy" is in > reality just the insertion, after it's finished. The "Result" suffix > is intended to convey that it's the point where the operation has > successfully finished. That's a convincing point. > Maybe we can add some commentary to make this clearer. For now, I'd just suggest a comment on GetXLogInsertRecPtr() explaining what it's returning and how that's different from logInsertResult. In the future, it would be nice to clarify where variable names like reservedUpto and CurrBytePos fit in. Also the external documentation for pg_current_wal_insert_lsn() is a bit ambiguous. > Lastly, I just noticed that I forgot credits and discussion link in > that > commit message. I would have attributed authorship to Bharath > though, > because I had not realized that this patch had actually been written > by > you initially[1]. My apologies. No worries. Thank you for reviewing and committing it. Regards, Jeff Davis
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