Re: Preventing index scans for non-recoverable index AMs

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Preventing index scans for non-recoverable index AMs
Date: 2008-12-18 02:28:46
Message-ID: 20081218022846.GN4453@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-12-18 02:32:12 Re: [PATCHES] Infrastructure changes for recovery (v8)
Previous Message Jeff Davis 2008-12-18 02:24:40 Re: Preventing index scans for non-recoverable index AMs