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 jeff.ja...@gmail.com wrote: On Mon, Jun 18, 2012 at 5:42 PM, Robert Haas robertmh...@gmail.com 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

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 robertmh...@gmail.com 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

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 jeff.ja...@gmail.com 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,

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 robertmh...@gmail.com 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

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

2012-05-31 Thread Dickson S. Guedes
2012/5/30 Robert Haas robertmh...@gmail.com: 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, --

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 lis...@guedesoft.net wrote: 2012/5/30 Robert Haas robertmh...@gmail.com: 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