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
..
2013-11-12 06:39:36 -05:00
2013-11-12 06:39:36 -05:00
2013-11-13 21:25:52 -05:00
2013-10-18 08:14:21 -04:00