[HACKERS] PG10 Crash-safe and replicable Hash Indexes and UNIQUE

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема [HACKERS] PG10 Crash-safe and replicable Hash Indexes and UNIQUE
Дата
Msg-id 6318fb86-0a64-61e7-e4e2-714db2b3407a@anastigmatix.net
обсуждение исходный текст
Ответы Re: [HACKERS] PG10 Crash-safe and replicable Hash Indexes and UNIQUE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

The item on hash indexes reminded me of an old comment from years
ago that I put in the code of the first custom PG datatype I ever
built at $work:

COMMENT ON OPERATOR CLASS puid_ops USING btree IS
'As puids are only identifiers, there is no obvious reason to define
ordering operators or support btree indexing. But for some curious
reason PostgreSQL 8.4 does not allow a hash index to support UNIQUE
constraints (this may be because, per the manual, hash index "operations
are not presently WAL-logged" so it could be risky to base constraints
on them). Therefore, the whole set of ordering operators must be
implemented to provide an operator class for the btree index method.';

Was my guess about the reason right? Does this PG10 announcement
also mean it will be possible to use UNIQUE constraints with some
pure-identifier, no-natural-ordering type that supports only hashing?

-Chap



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Preliminary results for proposed new pgindent implementation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] PG10 Crash-safe and replicable Hash Indexes and UNIQUE