Re: [HACKERS] select * from ..;vacuum crashes

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] select * from ..;vacuum crashes
Дата
Msg-id 199810120116.VAA28615@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] select * from ..;vacuum crashes  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Ответы Re: [HACKERS] select * from ..;vacuum crashes
Список pgsql-hackers
> >You must enable Assert to see the crash.
>
> I saw the crash without assertion enabled? This is FreeBSD 2.2.6.
>
> >The cause may be because you are doing a vacuum INSIDE a transaction.  I
> >think that also explains the psql -e thing, because that does both
> >commands in the same transaction.
> >
> >Perhaps we need to disable vacuum inside transactions.  Vadim?
>
> FYI, it is reported that 6.3.2 does not have the crash.

OK, this is fixed now.  The problem is that my new cache-use code finds
tuples by looking in the cache, getting the t_ctid value, and using
heap_fetch to get the tuple, rather than the older sequential
scan/ScanKey method.

However, when you vacuum a table, as the rows are moved, the t_ctid
changes, but there was no call to invalidate the system cache for the
row, so when you vacuum pg_class, and later use the cache to look up
something, the cache points to an old tuple.

This is fixed now, along with a little cache code cleanup that removes
some unused code that was confusing things.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Linux and -export-dynamic
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Problem dumping PL/pgsql functions.