Skip site navigation (1) Skip section navigation (2)

Re: Order of operations in lazy_vacuum_rel

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
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-08 17:47:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane wrote:
>> I see that lazy_vacuum_rel() truncates the heap before it does vacuuming
>> of the free space map.  Once upon a time this wouldn't have mattered,
>> but now it means that cancel interrupts are likely to be ignored for
>> the duration of FreeSpaceMapVacuum().  Is that really necessary?
>> Would it be okay to swap the two steps?

> How would it matter?  Interrupts are not enabled until the transaction
> is committed anyway, which must happen after both things have finished ..

The point would be to not disable interrupts till after doing the FSM
vacuuming.  Ignoring CANCEL for longer than we must is bad.

I'm also looking at not disabling the interrupt until lazy_truncate_heap
determines that it's actually going to do RelationTruncate.  The current
coding disables interrupts without any need in a large fraction of cases.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Marko TiikkajaDate: 2010-02-08 18:01:11
Subject: Re: Writeable CTEs patch
Previous:From: David E. WheelerDate: 2010-02-08 17:45:13
Subject: Re: damage control mode

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group