Re: Why does VACUUM FULL bother locking pages?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why does VACUUM FULL bother locking pages?
Date: 2005-09-22 15:38:27
Message-ID: 29307.1127403507@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> Oh, certainly! In this case, may I point out that scan_heap() does not
> bother locking pages, mentioning that "we assume that holding exclusive
> lock on the relation will keep other backends from looking at the page".
> In particular, it calls PageRepairFragmentation which runs with the page
> unlocked AFAICT.

> Seems like a bug to me.

I agree --- and a pretty silly one considering that there are LockBuffer
calls elsewhere in vacuum.c. Wonder how old that code is ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-09-22 15:41:50 Re: Hierarchical Queries--Stalled No Longer...
Previous Message Bruce Momjian 2005-09-22 15:33:50 Re: logging blemishes