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

Re: Proposal: String key space for advisory locks

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Christophe Pettus <xof(at)thebuild(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: String key space for advisory locks
Date: 2009-10-27 13:49:31
Message-ID: b42b73150910270649r59304f56h8501b6e31a780d4a@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Oct 26, 2009 at 4:30 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>
>> Why aren't you satisfied with hashtext('foo') ?
>
> Collisions, mostly.

Why even bother with a hash function when you can just have multiple
table pull from a shared sequence?  AFAICT, this solves the OP's
problem with no downsides (I used the approach with excellent results
in a ported cobol app which had pessimistic locking requirement).

merlin

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2009-10-27 14:01:01
Subject: Re: "toast.fillfactor" is documented but not recognized?
Previous:From: Kenneth MarshallDate: 2009-10-27 12:52:58
Subject: Re: Proposal: String key space for advisory locks

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