model-writtenrun 3857 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nathan Bossart reported a longstanding extra argument in the atomic-exchange fallback for pg_atomic_test_set_flag_impl() and supplied a one-line fix in #1.
- Nathan favored retaining the apparently little-used fallback because planned faster atomic-exchange implementations might activate it for some compiler and architecture combinations #1.
- Andres Freund acknowledged the mistake, asked whether Nathan would commit the fix, and questioned how faster atomic exchange could activate the fallback #2.
- Nathan agreed to commit and explained that defining PG_HAVE_ATOMIC_EXCHANGE_U32 without PG_HAVE_ATOMIC_TEST_SET_FLAG could select this fallback, while acknowledging that he had not exhaustively traced the preprocessor conditions #3.
- Nathan committed the attached fix unchanged as 69c32b8b35, with backpatches through PostgreSQL 12, and confirmed completion in #4, noting that backpatching seemed reasonable despite no known current problems.