Tom, Andres, I spun up a 64-core Graviton2 instance (where I reported seeing improvement with this patch) and ran the provided regression test with and without my proposed on top of mainline PG. I ran 4 runs each of 63 workers where we should see the most contention and most impact from the patch. I am reporting the average and standard deviation, the average with the patch is 10% lower latency, but there is overlap in the standard deviation. I'll gather additional data at lower worker counts and post later to see what the trend is.
Cmd: postgres=# SELECT test_shm_mq_pipelined(16384, 'xyzzy', 10000000, workers); Avg +/- standard dev 63 workers w/o patch: 552443ms +/- 22841ms 63 workers w/ patch: 502727 +/- 45253ms Best results w/o patch: 521216ms w/ patch: 436442ms Thanks, Geoff