Re: documentation for hashtext?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: documentation for hashtext?
Дата
Msg-id 1314444596.2349.7.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: documentation for hashtext?  ("Massa, Harald Armin" <harald@2ndQuadrant.de>)
Список pgsql-general
On tor, 2011-08-25 at 14:05 +0200, Massa, Harald Armin wrote:
> > conclusion was that it's not documented because it's internal and
> > you're not supposed to use/rely on it.
> >
> > My impression is that people are allready using it, relying their sharding
> on it, even building indexes on it.

I think a better solution is either to implement lookup3 in PostgreSQL,
which is what hashtext was originally based on, so you have a hash
function that won't change and is comparable to the current one in
behavior.  Or you use a standard cryptographic hash function such as md5
or sha1 and shard by that.  They are slower than the lookup3-type hash
functions, but for multiple-node applications, it's probably OK.

> So... I suggest we start documenting it. Even if there was a
> recommendation not to use it, people will get hurt anyway if their
> application rely on it and it breaks.

Well, it's already broken for what people are using it or are thinking
about using it, and documenting it won't help that.  Better come up with
a purpose-built solution, as per above.



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

Предыдущее
От: José María Terry Jiménez
Дата:
Сообщение: Re: Performing upgrade to latest minor release using PGDG RPMs
Следующее
От: "Maton, Brett"
Дата:
Сообщение: Re: Performing upgrade to latest minor release using PGDG RPMs