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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-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 Content-Type Size
btree-dont-panic-1.patch text/x-patch 16.6 KB

In response to

Browse pgsql-general by date

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

Browse pgsql-hackers by date

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