postgresql/src
Heikki Linnakangas 1a3d104475 Avoid acquiring spinlock when checking if recovery has finished, for speed.
RecoveryIsInProgress() can be called very frequently. During normal
operation, it just checks a backend-local variable and returns quickly,
but during hot standby, it checks a spinlock-protected shared variable.
Those spinlock acquisitions can become a point of contention on a busy
hot standby system.

Replace the spinlock acquisition with a memory barrier.

Per discussion with Andres Freund, Ants Aasma and Merlin Moncure.
2013-11-22 13:07:23 +02:00
..
backend Avoid acquiring spinlock when checking if recovery has finished, for speed. 2013-11-22 13:07:23 +02:00
bin Tweak streamutil.c further to avoid scan-build warning 2013-11-21 21:46:43 -05:00
common Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
include Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. 2013-11-21 19:37:20 -05:00
interfaces ecpg: Split off mmfatal() from mmerror() 2013-11-19 21:56:54 -05:00
makefiles Remove leftovers of IRIX port 2013-11-12 06:39:36 -05:00
pl Prevent leakage of cached plans and execution trees in plpgsql DO blocks. 2013-11-15 13:52:03 -05:00
port Get rid of use of asprintf() in favor of a more portable implementation. 2013-10-22 18:42:13 -04:00
template Remove leftovers of IRIX port 2013-11-12 06:39:36 -05:00
test Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. 2013-11-21 19:37:20 -05:00
timezone Fix whitespace issues found by git diff --check, add gitattributes 2013-11-10 14:48:29 -05:00
tools Fix whitespace 2013-11-13 21:25:52 -05:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02: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 libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Switch dependency order of libpgcommon and libpgport 2013-10-17 22:02:35 -04:00
Makefile.shlib Remove IRIX port. 2013-10-18 08:14:21 -04:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00