Re: [PATCHES] updated hash functions for postgresql v1

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: [PATCHES] updated hash functions for postgresql v1
Дата
Msg-id 1256756980.1769.17.camel@hvost1700
обсуждение исходный текст
Ответ на Re: [PATCHES] updated hash functions for postgresql v1  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCHES] updated hash functions for postgresql v1
Re: [PATCHES] updated hash functions for postgresql v1
Список pgsql-hackers
On Wed, 2009-02-11 at 11:22 -0500, Tom Lane wrote:
> Asko Oja <ascoja@gmail.com> writes:
> > Did this change hashtext() visible to users? We have been using it quite
> > widely for partitioning our databases. If so then it should be marked quite
> > visibly in release notes as there might be others who will be hit by this.
> 
> The hash functions are undocumented, have changed in the past, and are
> likely to change again in the future.  If you are using them in a way
> that depends on them to give the same answers across versions, you'd
> better stop.

Is at least the fact that they "are undocumented, have changed in the
past, and are likely to change again in the future" documented ?

I'm sure this is something that has hit unwary users in the past and
will hit again in the future, so some words about it in the doc's would
be appropriate.

search for "hashtext" on
http://www.postgresql.org/docs/8.4/interactive/index.html returned no
results, so I guess even theyr "undocumented, will surprise you" status
is not documented.

Hashing is a quite fundamental thing in computing, so I was quite
surprised to find out it had silently changed. 

I had never checked the docs for hash functions, but I had assumed, that
internal functions are prefixed by pg_ and anything else is public, free
to use functionality.

Changing hash functions also makes in-place upgrades a lot harder, as
they can't be done incrementally anymore for tables which use hash
indexes.


>             regards, tom lane
> 
-- 
Hannu Krosing   http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability   Services, Consulting and Training




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

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