postgresql/src
Simon Riggs efc16ea520 Allow read only connections during recovery, known as Hot Standby.
Enabled by recovery_connections = on (default) and forcing archive recovery using a recovery.conf. Recovery processing now emulates the original transactions as they are replayed, providing full locking and MVCC behaviour for read only queries. Recovery must enter consistent state before connections are allowed, so there is a delay, typically short, before connections succeed. Replay of recovering transactions can conflict and in some cases deadlock with queries during recovery; these result in query cancellation after max_standby_delay seconds have expired. Infrastructure changes have minor effects on normal running, though introduce four new types of WAL record.

New test mode "make standbycheck" allows regression tests of static command behaviour on a standby server while in recovery. Typical and extreme dynamic behaviours have been checked via code inspection and manual testing. Few port specific behaviours have been utilised, though primary testing has been on Linux only so far.

This commit is the basic patch. Additional changes will follow in this release to enhance some aspects of behaviour, notably improved handling of conflicts, deadlock detection and query cancellation. Changes to VACUUM FULL are also required.

Simon Riggs, with significant and lengthy review by Heikki Linnakangas, including streamlined redesign of snapshot creation and two-phase commit.

Important contributions from Florian Pflug, Mark Kirkwood, Merlin Moncure, Greg Stark, Gianni Ciolli, Gabriele Bartolini, Hannu Krosing, Robert Haas, Tatsuo Ishii, Hiroyuki Yamada plus support and feedback from many other community members.
2009-12-19 01:32:45 +00:00
..
backend Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
bin Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
include Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
interfaces Reverting accidently commited changes. 2009-12-17 07:28:58 +00:00
makefiles Update of install-sh, mkinstalldirs, and associated configury 2009-08-26 22:24:44 +00:00
pl Python 3 support in PL/Python 2009-12-15 22:59:55 +00:00
port Add inheritable ACE when creating a restricted token for execution on 2009-11-14 15:39:36 +00:00
template
test Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
timezone Update time zone data files to tzdata release 2009s: DST law changes in 2009-12-09 00:35:32 +00:00
tools Add notes about updating disk and shared memory size information in the 2009-12-09 17:03:30 +00:00
tutorial 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
bcc32.mak
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Update of install-sh, mkinstalldirs, and associated configury 2009-08-26 22:24:44 +00:00
Makefile.global.in Python 3 support in PL/Python 2009-12-15 22:59:55 +00:00
Makefile.shlib Derived files that are shipped in the distribution used to be built in the 2009-08-28 20:26:19 +00:00
nls-global.mk Update of install-sh, mkinstalldirs, and associated configury 2009-08-26 22:24:44 +00:00
win32.mak