Re: Preventing index scans for non-recoverable index AMs

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Preventing index scans for non-recoverable index AMs
Дата
Msg-id 20081218022846.GN4453@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Preventing index scans for non-recoverable index AMs  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Preventing index scans for non-recoverable index AMs  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Simon Riggs wrote:
> 
> On Wed, 2008-12-17 at 21:23 -0300, Alvaro Herrera wrote:

> > Maybe we should add a WAL record that's the physical representation for
> > "mark this index invalid", and have any transaction that modifies a hash
> > index write that to WAL.  It should be simple code to write, because
> > the underlying replay is based on a regular heap update.
> 
> Doesn't sound like it would work. It doesn't really matter how you
> *decide* to do this, it's when you do this that counts.

Hmm, it doesn't seem like you understood my suggestion ... basically I'm
saying that a hash index insert/delete should put out this WAL record:

HEAP update address-of-pg_index-tuple set indisvalid=false

(I'm just guessing at indisvalid but you get my point)

No need to remember anything.  Of course, the user then needs to fix the
index after the fact.

Of course, for 8.5 we would do something smarter.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Preventing index scans for non-recoverable index AMs
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PATCHES] Infrastructure changes for recovery (v8)