Re: [HACKERS] ERROR: btree scan list trashed ??

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] ERROR: btree scan list trashed ??
Date: 1999-08-04 15:59:07
Message-ID: 18242.933782347@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Adriaan Joubert <a(dot)joubert(at)albourne(dot)com> writes:
>> After some digging around in backend/access/nbtree/nbtscan.c, which is
>> producing the error, I notice that the routine in question is searching
>> a list that does not get cleared properly at transaction abort. It's
>> not clear that that's the cause of the error message, though.

> BTW, I've installed 6.5.1 and still have the same problems.

No surprise, really.

> Vacuuming hung up everything, and I had to shut the whole thing down
> and restart it to get it working again. Dropping the indices and
> rebuilding them all fixed the problem.

Hmm, that suggests that your indexes are actually getting corrupted.

> How difficult is it to clear the list at transaction abort? Is this
> something I could patch and try out?

The BTScans variable in nbtscan.c needs to be reset to NULL during
xact abort. I don't see how this would *directly* cause the
observed symptom, but failing to do it should lead to misbehavior in
_bt_adjscans() during later transactions, so it might be related
somehow. If you want to patch it, make a subroutine that clears the
variable (no need to free the list; since it's palloc'd it'll go
away anyway) and call it from transaction cleanup in
backend/access/transam/xact.c.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message eem21 1999-08-04 16:18:19 Re: [INTERFACES] Re: [HACKERS] Threads
Previous Message Thomas Lockhart 1999-08-04 15:42:48 Re: [HACKERS] Threads