Re: Incomplete freezing when truncating a relation during vacuum - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Incomplete freezing when truncating a relation during vacuum
Date
Msg-id 20131130172941.GI31100@awork2.anarazel.de
Whole thread Raw
In response to Re: Incomplete freezing when truncating a relation during vacuum  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On 2013-11-30 12:22:16 -0500, Noah Misch wrote:
> On Sat, Nov 30, 2013 at 05:00:58PM +0100, Andres Freund wrote:
> > The problem with log_newpage_buffer() is that we'd quite possibly issue
> > one such call per item on a page. And that might become quite
> > expensive. Logging ~1.5MB per 8k page in the worst case sounds a bit
> > scary.
> 
> I had in mind issuing at most one call per page.  heap_page_prune() has a
> structure conducive to that.

That, at least as far as I can imagine, would make the fix quite
complicated though. In the first phase heap_page_prune() we aren't in a
critical section and cannot modify the buffer yet, so we would make all
the involved code cope with the unfixed xids and hint bits.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Incomplete freezing when truncating a relation during vacuum
Next
From: Tom Lane
Date:
Subject: select_common_type()'s behavior doesn't match the documentation