postgresql/src
Tom Lane a5c025cbeb Reduce PANIC to ERROR in some occasionally-reported btree failure cases.
This patch changes _bt_split() and _bt_pagedel() to throw a plain ERROR,
rather than PANIC, for several cases that are reported from the field
from time to time:
* right sibling's left-link doesn't match;
* PageAddItem failure during _bt_split();
* parent page's next child isn't right sibling during _bt_pagedel().
In addition the error messages for these cases have been made a bit
more verbose, with additional values included.

The original motivation for PANIC here was to capture core dumps for
subsequent analysis.  But with so many users whose platforms don't capture
core dumps by default, or who are unprepared to analyze them anyway, it's hard
to justify a forced database restart when we can fairly easily detect the
problems before we've reached the critical sections where PANIC would be
necessary.  It is not currently known whether the reports of these messages
indicate well-hidden bugs in Postgres, or are a result of storage-level
malfeasance; the latter possibility suggests that we ought to try to be more
robust even if there is a bug here that's ultimately found.

Backpatch to 8.2.  The code before that is sufficiently different that
it doesn't seem worth the trouble to back-port further.
2010-08-29 19:33:43 +00:00
..
backend Reduce PANIC to ERROR in some occasionally-reported btree failure cases. 2010-08-29 19:33:43 +00:00
bin Fix psql's copy of utf2ucs() to match the backend's copy exactly; 2010-08-16 00:06:42 +00:00
include Improved version of patch to protect pg_get_expr() against misuse: 2010-07-30 17:57:12 +00:00
interfaces tag 8.2.17 2010-05-14 03:32:06 +00:00
makefiles Add $(CFLAGS) to the simplified build rule for .so libraries on Darwin. 2006-11-28 05:45:43 +00:00
pl Catch null pointer returns from PyCObject_AsVoidPtr and PyCObject_FromVoidPtr 2010-08-25 19:37:39 +00:00
port tag 8.2.17 2010-05-14 03:32:06 +00:00
template Make --with-ldap build on Unixware, per Olivier Prenant. 2006-12-14 21:50:07 +00:00
test Fix incorrect logic in plpgsql for cleanup after evaluation of non-simple 2010-08-09 18:50:45 +00:00
timezone Update time zone data files to tzdata release 2010l: DST law changes in 2010-08-26 19:59:15 +00:00
tools Fix MSVC builds for recent plperl changes. Go back to version 8.2, which is 2010-05-13 21:34:55 +00:00
tutorial Fix some misuses of strncat(). 2006-09-27 16:19:42 +00:00
bcc32.mak Fix bcc32.mak to create and remove pg_config_os.h properly. Apparently 2006-10-06 18:53:53 +00:00
DEVELOPERS Testing commit stuff 2006-07-10 15:50:02 +00:00
Makefile Remove dllinit.c; it was only needed for long-obsolete Cygwin versions, 2006-06-22 23:50:35 +00:00
Makefile.global.in On Windows, we know the backend stack size limit because we have to 2006-10-08 17:15:34 +00:00
Makefile.shlib Fix shared library creation to work properly on AIX. Albe Laurenz 2006-09-19 15:36:08 +00:00
nls-global.mk When merging PO files, take into consideration translations in other PO 2006-04-05 13:40:15 +00:00
win32.mak Fix win32.mak for config cleanup. 2006-08-08 22:44:05 +00:00