Re: heap vacuum & cleanup locks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: heap vacuum & cleanup locks
Date: 2011-11-09 22:20:56
Message-ID: 21457.1320877256@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> heapgetpage() gets a page and a pin, but holds the pin until it reads
> the next page. Wow!

> That is both annoying and very dumb. It should hold the pin long
> enough to copy the data and then release the pin.

I don't find that anywhere near as obvious as you seem to. I think you
are trying to optimize for the wrong set of conditions.

I will also note that the behavior of holding pin for as long as we are
stopped on a particular tuple is not specific to seqscans.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2011-11-09 22:24:31 Re: 9.1.2 ?
Previous Message Tom Lane 2011-11-09 22:18:04 Re: heap vacuum & cleanup locks