Go to file
Heikki Linnakangas d59ff6c110 Fix bug in determining when recovery has reached consistency.
When starting WAL replay from an online checkpoint, the last replayed WAL
record variable was initialized using the checkpoint record's location, even
though the records between the REDO location and the checkpoint record had
not been replayed yet. That was noted as "slightly confusing" but harmless
in the comment, but in some cases, it fooled CheckRecoveryConsistency to
incorrectly conclude that we had already reached a consistent state
immediately at the beginning of WAL replay. That caused the system to accept
read-only connections in hot standby mode too early, and also PANICs with
message "WAL contains references to invalid pages".

Fix by initializing the variables to the REDO location instead.

In 9.2 and above, change CheckRecoveryConsistency() to use
lastReplayedEndRecPtr variable when checking if backup end location has
been reached. It was inconsistently using EndRecPtr for that check, but
lastReplayedEndRecPtr when checking min recovery point. It made no
difference before this patch, because in all the places where
CheckRecoveryConsistency was called the two variables were the same, but
it was always an accident waiting to happen, and would have been wrong
after this patch anyway.

Report and analysis by Tomonari Katsumata, bug #8686. Backpatch to 9.0,
where hot standby was introduced.
2014-01-08 15:03:09 +02:00
config Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
contrib pg_upgrade: Fix fatal error handling 2014-01-08 07:01:16 -05:00
doc Update copyright for 2014 2014-01-07 16:05:30 -05:00
src Fix bug in determining when recovery has reached consistency. 2014-01-08 15:03:09 +02:00
.dir-locals.el Update Emacs configuration 2013-08-13 20:08:44 -04:00
.gitattributes gitattributes: Make syntax compatible with older Git versions 2013-11-12 21:58:46 -05:00
.gitignore Add *.pot to .gitignore 2013-10-19 10:56:52 -04:00
COPYRIGHT Update copyright for 2014 2014-01-07 16:05:30 -05:00
GNUmakefile.in Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Allow make check in PL directories 2011-02-15 06:52:12 +02:00
README Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
README.git Fix doc links in README file to work with new website layout 2013-11-12 12:53:32 +01:00
aclocal.m4 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
configure Update copyright for 2014 2014-01-07 16:05:30 -05:00
configure.in Update copyright for 2014 2014-01-07 16:05:30 -05:00

README

PostgreSQL Database Management System
=====================================

This directory contains the source code distribution of the PostgreSQL
database management system.

PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, user-defined types
and functions.  This distribution also contains C language bindings.

PostgreSQL has many language interfaces, many of which are listed here:

	http://www.postgresql.org/download

See the file INSTALL for instructions on how to build and install
PostgreSQL.  That file also lists supported operating systems and
hardware platforms and contains information regarding any other
software packages that are required to build or run the PostgreSQL
system.  Changes between all PostgreSQL releases are recorded in the
file HISTORY.  Copyright and license information can be found in the
file COPYRIGHT.  A comprehensive documentation set is included in this
distribution; it can be read as described in the installation
instructions.

The latest version of this software may be obtained at
http://www.postgresql.org/download/.  For more information look at our
web site located at http://www.postgresql.org/.