Re: [HACKERS] Proposal: global index

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] Proposal: global index
Дата
Msg-id 20170818144047.tpfdfok7qijfopld@alvherre.pgsql
обсуждение исходный текст
Ответ на [HACKERS] Proposal: global index  (Ildar Musin <i.musin@postgrespro.ru>)
Ответы Re: [HACKERS] Proposal: global index  (Ildar Musin <i.musin@postgrespro.ru>)
Re: [HACKERS] Proposal: global index  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Ildar Musin wrote:

> While we've been developing pg_pathman extension one of the most frequent
> questions we got from our users was about global index support. We cannot
> provide it within an extension. And I couldn't find any recent discussion
> about someone implementing it. So I'm thinking about giving it a shot and
> start working on a patch for postgres.
> 
> One possible solution is to create an extended version of item pointer which
> would store relation oid along with block number and position:

I've been playing with the index code in order to allow indirect tuples,
which are stored in a format different from IndexTupleData.

I've been adding an "InMemoryIndexTuple" (maybe there's a better name)
which internally has pointers to both IndexTupleData and
IndirectIndexTupleData, which makes it easier to pass around the index
tuple in either format.  It's very easy to add an OID to that struct,
which then allows to include the OID in either an indirect index tuple
or a regular one.

Then, wherever we're using IndexTupleData in the index AM code, we would
replace it with InMemoryIndexTuple.  This should satisfy both your use
case and mine.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Erikjan Rijkers
Дата:
Сообщение: Re: [HACKERS] Proposal: global index
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] Proposal: global index