postgresql/src
Andres Freund 6b93fcd149 Avoid atomic operation in MarkLocalBufferDirty().
The recent patch to make Pin/UnpinBuffer lockfree in the hot
path (48354581a), accidentally used pg_atomic_fetch_or_u32() in
MarkLocalBufferDirty(). Other code operating on local buffers was
careful to only use pg_atomic_read/write_u32 which just read/write from
memory; to avoid unnecessary overhead.

On its own that'd just make MarkLocalBufferDirty() slightly less
efficient, but in addition InitLocalBuffers() doesn't call
pg_atomic_init_u32() - thus the spinlock fallback for the atomic
operations isn't initialized. That in turn caused, as reported by Tom,
buildfarm animal gaur to fail.  As those errors are actually useful
against this type of error, continue to omit - intentionally this time -
initialization of the atomic variable.

In addition, add an explicit note about only using pg_atomic_read/write
on local buffers's state to BufferDesc's description.

Reported-By: Tom Lane
Discussion: 1881.1460431476@sss.pgh.pa.us
2016-04-13 15:28:29 -07:00
..
backend Avoid atomic operation in MarkLocalBufferDirty(). 2016-04-13 15:28:29 -07:00
bin Improve coding of column-name parsing in psql's new crosstabview.c. 2016-04-12 12:52:42 -04:00
common Remove redundant message in AddUserToTokenDacl(). 2016-04-06 23:40:51 -04:00
fe_utils Support \crosstabview in psql 2016-04-08 20:23:18 -03:00
include Avoid atomic operation in MarkLocalBufferDirty(). 2016-04-13 15:28:29 -07:00
interfaces Remove unnecessary definition of _WIN64 in libpq/win32.mak. 2016-04-12 10:52:58 -04:00
makefiles Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pl Fix freshly-introduced PL/Python portability bug. 2016-04-11 18:17:20 -04:00
port Standardize GetTokenInformation() error reporting. 2016-04-06 23:41:43 -04:00
template Remove some remains from Alpha support removal 2015-10-29 16:40:14 -04:00
test Fix two places that thought Windows64 is indicated by WIN64 macro. 2016-04-11 19:37:04 -04:00
timezone Suppress compiler warning. 2016-04-02 13:49:17 -04:00
tools Make oldSnapshotControl a pointer to a volatile structure 2016-04-11 15:43:52 -05:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
Makefile.global.in Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
Makefile.shlib AIX: Link TRANSFORM modules with their dependencies. 2015-07-15 21:00:26 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00