postgresql/src/include/storage
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
..
backendid.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
block.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
buf.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
buf_internals.h Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics. 2009-12-15 04:57:48 +00:00
buffile.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
bufmgr.h Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics. 2009-12-15 04:57:48 +00:00
bufpage.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
fd.h Improve error messages in md.c. When a filesystem operation like open() or 2009-08-05 18:01:54 +00:00
freespace.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
fsm_internals.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
indexfsm.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
ipc.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
item.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
itemid.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
itemptr.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
large_object.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
lmgr.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
lock.h Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
lwlock.h Remove the placeholder LWLockId in place of the removed FreeSpaceLock. 2009-03-03 08:11:24 +00:00
off.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
pg_sema.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
pg_shmem.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
pmsignal.h Remove the use of the pg_auth flat file for client authentication. 2009-08-29 19:26:52 +00:00
pos.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
proc.h Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
procarray.h Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
procsignal.h Create a multiplexing structure for signals to Postgres child processes. 2009-07-31 20:26:23 +00:00
relfilenode.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
s_lock.h Add s_lock support for SuperH architecture. 2009-07-27 05:31:05 +00:00
shmem.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
sinval.h Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
sinvaladt.h Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
smgr.h Fix some serious bugs in archive recovery, now that bgwriter is active 2009-06-25 21:36:00 +00:00
spin.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
standby.h Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00