Re: Lock problem with autovacuum truncating heap - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Lock problem with autovacuum truncating heap
Date
Msg-id 0C6447D9-4C45-42F3-862B-A9C389DE0ECC@gmail.com
Whole thread Raw
In response to Re: Lock problem with autovacuum truncating heap  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: Lock problem with autovacuum truncating heap
List pgsql-hackers
On Mar 26, 2011, at 4:16 PM, Jan Wieck <JanWieck@Yahoo.com> wrote:
> That was what I meant. Go in steps of 16-64MB backwards and scan from there to the current end in forward direction
tofind a nondeletable block. In between these steps, release and reacquire the exclusive lock so that client
transactionscan get their work done. 

Well, VACUUM uses a 16MB ring buffer, so anything that size or smaller should hit shared_buffers most of the time.

I wonder though if this might defeat read-behind on operating systems that do have a working implementation.  With our
currentapproach each read will end at the point the previous read started, which might be an algorithm somebody is
usingto detect a backward scan. 

...Robert

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Lock problem with autovacuum truncating heap
Next
From: Pavel Stehule
Date:
Subject: Can I check if somebody is superuser in stored procedure?