help with a patch

Поиск
Список
Период
Сортировка
От Neil Conway
Тема help with a patch
Дата
Msg-id 1015915265.4927.16.camel@jiro
обсуждение исходный текст
Ответы Re: help with a patch  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Hi all,

I'm working on implementing unique hash indexes. I've got most of the
code finished, but I'm stumped on how to implement the remainder. Since
I'm still a newbie to the Postgres code, so any pointers or help would
be much appreciated.

I've been able to borrow a fair amount of code from the btree unique
index implementation (where possible, I've tried to share code between
hash and btree, I'll do this more in the final patch). The problem I'm
having is the implementation of the _hash_check_unique() function. This
is passed the Buffer which corresponds to the first page in the bucket
chain for the key, the hash item itself, the ScanKey, as well as the
index Relation and the heap Relation. Given this, how does one scan
through the hash bucket to determine if a matching key is present?

I can probably figure out the MVCC related code (ensuring that the
tuples we find aren't dead, etc); what I can't figure out is the basic
methodology required to search for matching tuples in the hash bucket.

Any help would be appreciated. I've attached the current development
version of the patch, if that is of any help.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

Вложения

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

Предыдущее
От: "Luis Alberto Amigo Navarro"
Дата:
Сообщение: Re: bad performance on irix
Следующее
От: Manuel Martin
Дата:
Сообщение: how to get info about spatial extension of pgsql?