Re: Proposal: String key space for advisory locks

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Proposal: String key space for advisory locks
Дата
Msg-id 20091026131139.GB8812@alvh.no-ip.org
обсуждение исходный текст
Ответ на Proposal: String key space for advisory locks  (Christophe Pettus <xof@thebuild.com>)
Ответы Re: Proposal: String key space for advisory locks  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Christophe Pettus wrote:

> API Changes:
> 
> Overloading the various advisory lock functions to take a suitable
> string type (varchar(64)?) in addition to the bigint / 2 x int
> variations.  As with the bigint / 2 x int forms, this string
> namespace would be disjoint from the other key spaces.

I don't think this can be made to work.  The locktag hash element has a
fixed size.  Perhaps you could make it work if you hashed the string and
used that as a locktag, but it would lock too much as soon as two
strings had matching hashes.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Parsing config files in a directory
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Parsing config files in a directory