Preventing index scans for non-recoverable index AMs

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Preventing index scans for non-recoverable index AMs
Date: 2008-12-17 21:26:12
Message-ID: 1229549172.4793.105.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hot Standby won't work with hash indexes because they are
non-recoverable.

We have a number of ways of dealing with this:

1. Workaround: Implement WAL for hash indexes

2. Specific Solution: make hashcostestimate() massively increase cost of
scans during recovery so that they will very seldom be picked and make
hashbeginscan() refuse scans during recovery in case they do happen

3. Generic Solution: add amisrecoverable flag to pg_am, and alter
generic index AM to check whether index is recoverable before selecting
it during planning

I was hoping to do (1), but I'm looking for a quicker solution now so we
can tie up loose ends for review.

(2) seems most appropriate, since it will last only until (1) is
complete in a later release.

Anyone see additional options or prefer alternatives?

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-12-17 21:57:15 Re: Partitioning wiki page
Previous Message MUHAMMAD ASIF 2008-12-17 20:56:29 Re: PLUGINS Functionlity in Win32 build scripts