Re: [HACKERS] patch: avoid heavyweight locking on hash metapage

2012-06-26 Thread Robert Haas
On Mon, Jun 25, 2012 at 11:05 PM, Jeff Janes wrote: > On Mon, Jun 18, 2012 at 5:42 PM, Robert Haas wrote: >> >> Hmm.  That was actually a gloss I added on existing code to try to >> convince myself that it was safe; I don't think that the changes I >> made make that any more or less safe than it

Re: [HACKERS] patch: avoid heavyweight locking on hash metapage

2012-06-25 Thread Jeff Janes
On Mon, Jun 18, 2012 at 5:42 PM, Robert Haas wrote: > > Hmm.  That was actually a gloss I added on existing code to try to > convince myself that it was safe; I don't think that the changes I > made make that any more or less safe than it was before. Right, sorry. I thought there was some streng

Re: [HACKERS] patch: avoid heavyweight locking on hash metapage

2012-06-18 Thread Robert Haas
On Fri, Jun 15, 2012 at 1:58 PM, Jeff Janes wrote: > Do we need the retry flag (applies to two places)?  If oldblkno is > still InvalidBlockNumber then it can't equal blkno. I was a bit concerned that blkno = BUCKET_TO_BLKNO(metap, bucket) might set blkno to InvalidBlockNumber, thus possibly mess

Re: [HACKERS] patch: avoid heavyweight locking on hash metapage

2012-06-15 Thread Jeff Janes
On Wed, May 30, 2012 at 3:14 PM, Robert Haas wrote: > I developed the attached patch to avoid taking a heavyweight lock on > the metapage of a hash index.  Instead, an exclusive buffer content > lock is viewed as sufficient permission to modify the metapage, and a > shared buffer content lock is u

Re: [HACKERS] patch: avoid heavyweight locking on hash metapage

2012-05-31 Thread Robert Haas
On Thu, May 31, 2012 at 7:07 AM, Dickson S. Guedes wrote: > 2012/5/30 Robert Haas : >> I tested the effect of this by setting up a series of 5-minute >> read-only pgbench run at scale factor 300 with 8GB of shared buffers >> on the IBM POWER7 machine. > > I know it doesn't matter, but out of curio

Re: [HACKERS] patch: avoid heavyweight locking on hash metapage

2012-05-31 Thread Dickson S. Guedes
2012/5/30 Robert Haas : > I tested the effect of this by setting up a series of 5-minute > read-only pgbench run at scale factor 300 with 8GB of shared buffers > on the IBM POWER7 machine. I know it doesn't matter, but out of curiosity what OS you used? best regards, -- Dickson S. Guedes mail/xm

[HACKERS] patch: avoid heavyweight locking on hash metapage

2012-05-30 Thread Robert Haas
I developed the attached patch to avoid taking a heavyweight lock on the metapage of a hash index. Instead, an exclusive buffer content lock is viewed as sufficient permission to modify the metapage, and a shared buffer content lock is used when such modifications need to be prevented. For the mo