Re: Order of operations in lazy_vacuum_rel

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Order of operations in lazy_vacuum_rel
Date: 2010-02-09 01:18:08
Message-ID: 20100209011808.GA4113@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-02-09 01:20:04 Re: buildfarm breakage
Previous Message Andrew Dunstan 2010-02-09 01:07:00 buildfarm breakage