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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "ERROR: could not read block 6 ...: read only 0 of 8192 bytes" after autovacuum cancelled
Date: 2009-11-04 20:21:30
Message-ID: 20537.1257366090@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2009-11-04 20:28:11 Experimental patch: generating BKI revisited
Previous Message Tom Lane 2009-11-04 20:05:23 Re: WIP: pushing parser hooks through SPI and plancache