Re: "ERROR: could not read block 6 ...: read only 0 of 8192 bytes" after autovacuum cancelled - Mailing list pgsql-hackers

From Tom Lane
Subject Re: "ERROR: could not read block 6 ...: read only 0 of 8192 bytes" after autovacuum cancelled
Date
Msg-id 20537.1257366090@sss.pgh.pa.us
Whole thread Raw
In response to "ERROR: could not read block 6 ...: read only 0 of 8192 bytes" after autovacuum cancelled  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: "ERROR: could not read block 6 ...: read only 0 of 8192 bytes" after autovacuum cancelled
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> What I thought could have happened is that the table was truncated, and
> then the sinval message telling that to other backends was not sent due
> to the rollback.

Hmm.

> 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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: WIP: pushing parser hooks through SPI and plancache
Next
From: John Naylor
Date:
Subject: Experimental patch: generating BKI revisited