Re: LogwrtResult contended spinlock

Alexander Law <exclusion@gmail.com>

From: Alexander Lakhin <exclusion@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Andres Freund <andres@anarazel.de>, Jeff Davis <pgsql@j-davis.com>, pgsql-hackers@lists.postgresql.org, Jaime Casanova <jcasanov@systemguards.com.ec>
Date: 2024-07-02T05:00:00Z
Lists: pgsql-hackers
01.07.2024 20:04, Alvaro Herrera wrote:
> OK, so it's
> #if ALIGNOF_LONG_LONG_INT >= 8
>
> Alexander, can you please confirm whether this works for you?

Yes, the v4 patch makes `meson test --suite setup` pass in x86 environment.
And complete `meson test` fails on pg_amcheck/004_verify_heapam only
(I think it's a separate issue, just want to announce what else is broken
on that platform)

Thank you!

Best regards,
Alexander



Commits

  1. Remove bogus assertion in pg_atomic_monotonic_advance_u64

  2. Add XLogCtl->logInsertResult

  3. Operate XLogCtl->log{Write,Flush}Result with atomics

  4. Split XLogCtl->LogwrtResult into separate struct members

  5. Introduce atomic read/write functions with full barrier semantics.

  6. Reduce the number of GetFlushRecPtr() calls done by walsenders.

  7. Remove most volatile qualifiers from xlog.c