postgresql/src
Alvaro Herrera e7ec022266 Fix longstanding problems in VACUUM caused by untimely interruptions
In VACUUM FULL, an interrupt after the initial transaction has been recorded
as committed can cause postmaster to restart with the following error message:
PANIC: cannot abort transaction NNNN, it was already committed
This problem has been reported many times.

In lazy VACUUM, an interrupt after the table has been truncated by
lazy_truncate_heap causes other backends' relcache to still point to the
removed pages; this can cause future INSERT and UPDATE queries to error out
with the following error message:
could not read block XX of relation 1663/NNN/MMMM: read only 0 of 8192 bytes
The window to this race condition is extremely narrow, but it has been seen in
the wild involving a cancelled autovacuum process.

The solution for both problems is to inhibit interrupts in both operations
until after the respective transactions have been committed.  It's not a
complete solution, because the transaction could theoretically be aborted by
some other error, but at least fixes the most common causes of both problems.
2009-11-10 18:00:06 +00:00
..
backend Fix longstanding problems in VACUUM caused by untimely interruptions 2009-11-10 18:00:06 +00:00
bin In psql, show view definition only with \d+, not with \d 2009-11-03 10:34:47 +00:00
include Fix longstanding problems in VACUUM caused by untimely interruptions 2009-11-10 18:00:06 +00:00
interfaces Don't treat NEW and OLD as reserved words anymore. For the purposes of rules 2009-11-05 23:24:27 +00:00
makefiles Update of install-sh, mkinstalldirs, and associated configury 2009-08-26 22:24:44 +00:00
pl More incremental refactoring in plpgsql: get rid of gram.y dependencies on 2009-11-10 02:13:13 +00:00
port Don't error out if recycling or removing an old WAL segment fails at the end 2009-09-13 18:32:08 +00:00
template Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running 2009-02-11 20:02:40 +00:00
test Fix WHERE CURRENT OF to work as designed within plpgsql. The argument 2009-11-09 02:36:59 +00:00
timezone Fix a couple of issues in recent patch to print updates to postgresql.conf 2009-10-03 18:04:57 +00:00
tools Update translation updating procedure. This pertains to some changes I 2009-10-20 18:22:19 +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 Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
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 Build bzip2 tarball in dist target as well 2009-11-03 21:28:10 +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 Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00