Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] 3rd time is a charm.....right sibling is not next child crash.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] 3rd time is a charm.....right sibling is not next child crash.
Date: 2010-08-28 23:43:54
Message-ID: 1975.1283039034@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
I wrote:
> it did occur to me that there is a simple way to ameliorate this
> problem: we could rearrange the code in _bt_pagedel() so it checks for
> this case before entering its critical section.  Then, corruption of
> this kind is at least only an ERROR not a PANIC.

In particular, I propose the attached patch, which gets rid of
unnecessary PANIC cases in _bt_split as well as _bt_pagedel;
all of these get reported from the field every now and then.
In passing this also makes the error messages out of _bt_split
a bit more detailed.

FWIW, I think the original rationale for PANIC here was so we could
capture a core dump for study; but since no one has ever yet cooperated
by providing such a dump, it seems like not panicking is a better plan.

Barring objections, I plan to back-patch this as far as it will
conveniently go (looks like 8.2 or 8.3 or so).

			regards, tom lane


Attachment: btree-dont-panic-1.patch
Description: text/x-patch (16.6 KB)

In response to

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2010-08-29 10:20:50
Subject: performance issue: logical operators are slow inside SQL function: missing optimalization?
Previous:From: Greg SmithDate: 2010-08-28 21:00:31
Subject: Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)

pgsql-general by date

Next:From: Merlin MoncureDate: 2010-08-29 01:27:41
Subject: Re: looping on NEW and OLD in a trigger
Previous:From: Fabrízio de Royes MelloDate: 2010-08-28 22:23:23
Subject: Re: looping on NEW and OLD in a trigger

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group