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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] ERROR: btree scan list trashed ??
Дата
Msg-id 18242.933782347@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] ERROR: btree scan list trashed ??  (Adriaan Joubert <a.joubert@albourne.com>)
Список pgsql-hackers
Adriaan Joubert <a.joubert@albourne.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Adriaan Joubert
Дата:
Сообщение: Re: [HACKERS] ERROR: btree scan list trashed ??
Следующее
От: eem21@cam.ac.uk
Дата:
Сообщение: Re: [INTERFACES] Re: [HACKERS] Threads