postgresql/src/include/utils
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
..
acl.h Add large object access control. 2009-12-11 03:34:57 +00:00
array.h Remove SQL-compatibility function cardinality(). It is not exactly clear 2009-04-09 17:39:50 +00:00
ascii.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
builtins.h Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
bytea.h Support hex-string input and output for type BYTEA. 2009-08-04 16:08:37 +00:00
cash.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
catcache.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
combocid.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
date.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
datetime.h Fix range check in date_recv that tried to limit accepted values to only 2009-10-26 16:13:11 +00:00
datum.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
dynahash.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
dynamic_loader.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
elog.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
errcodes.h Add exclusion constraints, which generalize the concept of uniqueness to 2009-12-07 05:22:23 +00:00
fmgrtab.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
formatting.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
geo_decls.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
guc.h Prevent indirect security attacks via changing session-local state within 2009-12-09 21:57:51 +00:00
guc_tables.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
help_config.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
hsearch.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
inet.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
int8.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
inval.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
logtape.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
lsyscache.h Extend EXPLAIN to support output in XML or JSON format. 2009-08-10 05:46:50 +00:00
memutils.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
nabstime.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
numeric.h Support EEEE (scientific notation) in to_char(). 2009-08-10 18:29:27 +00:00
palloc.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
pg_crc.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
pg_locale.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
pg_lzcompress.h This patch addresses some issues in TOAST compression strategy that 2008-03-07 23:20:21 +00:00
pg_rusage.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
plancache.h Add support for invoking parser callback hooks via SPI and in cached plans. 2009-11-04 22:26:08 +00:00
portal.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
ps_status.h Add GUC update_process_title to control whether 'ps' display is updated 2006-06-27 22:16:44 +00:00
rel.h Add exclusion constraints, which generalize the concept of uniqueness to 2009-12-07 05:22:23 +00:00
relcache.h Add exclusion constraints, which generalize the concept of uniqueness to 2009-12-07 05:22:23 +00:00
resowner.h Fix bug in temporary file management with subtransactions. A cursor opened 2009-12-03 11:03:29 +00:00
selfuncs.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
snapmgr.h Fix snapshot management, take two. 2009-10-07 16:27:18 +00:00
snapshot.h Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
syscache.h Create an ALTER DEFAULT PRIVILEGES command, which allows users to adjust 2009-10-05 19:24:49 +00:00
timestamp.h Fix overflow for INTERVAL 'x ms' where x is more than a couple million, 2009-08-18 21:23:14 +00:00
tqual.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
tuplesort.h Extend EXPLAIN to support output in XML or JSON format. 2009-08-10 05:46:50 +00:00
tuplestore.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
typcache.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
tzparser.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
uuid.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
varbit.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
xml.h Extend EXPLAIN to support output in XML or JSON format. 2009-08-10 05:46:50 +00:00