Re: Order of operations in lazy_vacuum_rel - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Order of operations in lazy_vacuum_rel
Date
Msg-id 20100209011808.GA4113@alvh.no-ip.org
Whole thread Raw
In response to Re: Order of operations in lazy_vacuum_rel  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Order of operations in lazy_vacuum_rel  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> Actually, after thinking about this some more, I realize that this code
> has got a significantly bigger problem than just whether it will respond
> to CANCEL promptly.  If we truncate the table, and then get an error
> sometime before commit, the relcache inval message will not be sent,
> leaving other backends at significant risk of strange errors due to
> having rd_targblock pointing somewhere past the end of the table.
> So we should reorder these operations just to reduce the risk window,
> and I've done so.

Err, that problem was exactly why I added the interrupt holdoff in
there, so if you've got a better/more invasive solution, it's very
welcome.

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


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: buildfarm breakage
Next
From: Tom Lane
Date:
Subject: Re: buildfarm breakage