Re: [HACKERS] A patch for FATAL 1:btree: BTP_CHAIN flag was expected

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: t-ishii(at)sra(dot)co(dot)jp
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] A patch for FATAL 1:btree: BTP_CHAIN flag was expected
Date: 1999-05-01 16:16:07
Message-ID: 372B28C7.D0C9656D@krs.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tatsuo Ishii wrote:
>
> >
> >There exists the bug that causes elog() FATAL 1:btree:
> >BTP_CHAIN flag was expected.
> >The following patch would solve the bug partially.
> >
> >It seems that the bug is caused by _bt_split() in nbtinsert.c.
> >BTP_CHAIN flags of buf/rbuf are always off immediately after
> >_bt_split(),so the pages may be in inconsistent state.
> >Though the flags are chagned correctly before _bt_relbuf(),
> >buf/rbuf are not _bt_wrt(norel)buf()'d after the change
> >(buf/rbuf are already _bt_wrtnorelbuf()'d in _bt_split() ).

Exactly! If left/right pages would be flushed by other transaction
before setting BTP_CHAIN flag then this flag would be lost!
Where were my eyes! -:)

Thanks, Hiroshi!
Committed.

All versions >= 6.1 are affected by this bug...

I'll make patch for 6.4.2 in a few days if no one else...

Vadim

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 1999-05-01 16:31:55 6.5 cvs ERROR: copyObject: don't know how to copy 604
Previous Message Tom Lane 1999-05-01 15:39:10 Re: [HACKERS] A select with aggretion is failing, still subtle problems with aggregation