Re: "ERROR: could not read block 6 ...: read only 0 of 8192 bytes" after autovacuum cancelled

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: "ERROR: could not read block 6 ...: read only 0 of 8192 bytes" after autovacuum cancelled
Дата
Msg-id 20091106150446.GD3840@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: "ERROR: could not read block 6 ...: read only 0 of 8192 bytes" after autovacuum cancelled  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: "ERROR: could not read block 6 ...: read only 0 of 8192 bytes" after autovacuum cancelled
Список pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:

> > So far as I can see, what we need is to make sure the sinval message is
> > sent regardless of transaction commit/abort.  How can that be done?
>
> I would argue that once we've truncated, it's too late to abort.  The
> interrupt facility should be disabled from just before issuing the
> truncate till after commit.  It would probably be relatively painless to
> do that with some manipulation of the interrupt holdoff stuff.

That cures my (admittedly simplistic) testcase.  The patch is a bit ugly
because the interrupts are held off in lazy_vacuum_rel and need to be
released by its caller.  I don't see any other way around the problem
though.

The attached patch is for 8.4; back branches all need a bit of editing.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: WIP: convert plpgsql to using parser hooks
Следующее
От: Tom Lane
Дата:
Сообщение: Re: "ERROR: could not read block 6 ...: read only 0 of 8192 bytes" after autovacuum cancelled