Skip site navigation (1) Skip section navigation (2)

Hash twice

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Hash twice
Date: 2013-01-12 16:39:15
Message-ID: CA+U5nMK7agTq7GBn1z1OmzxFqc89VijJYQ_3CLDKYymdWr5gOg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Lock code says it calculates "hash value once and then pass around as needed".

But it actually calculates it twice for new locks.

Trivial patch attached to make it follow the comments in
LockTagHashCode and save a few cycles.

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

Attachment: hash_once.v1.patch
Description: application/octet-stream (1.2 KB)

Responses

pgsql-hackers by date

Next:From: Andres FreundDate: 2013-01-12 17:20:34
Subject: Re: [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4)
Previous:From: Amit kapilaDate: 2013-01-12 14:10:45
Subject: Re: Performance Improvement by reducing WAL for Update Operation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group