Re: Adjusting index special storage for pg_filedump's convenience

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Sherry <swm(at)alcove(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Adjusting index special storage for pg_filedump's convenience
Date: 2007-04-10 01:17:09
Message-ID: 15994.1176167829@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gavin Sherry <swm(at)alcove(dot)com(dot)au> writes:
> On Mon, 9 Apr 2007, Tom Lane wrote:
>> ... I don't see any way to make it completely bulletproof
>> without enlarging the special space, which seems an unreasonable price
>> to pay. But even one chance in 16K is way better than the current
>> situation.

> Sounds like the only workable approach.

Actually, I realized after writing that that it *is* possible to make it
bulletproof: all we have to do is make the BTCycleId wrap around at a
little less than 64K, which adds about one line of code and doesn't
materially change its reliability. That leaves a few bitpatterns free
for IDs of other index types with no chance of collision. I made hash
use 0xFF80 and gist 0xFF81; please use 0xFF82 for bitmaps. (GIN turns
out not to need a code because its special space is a different size,
so we can tell it apart anyway.)

See patch already committed here:
http://archives.postgresql.org/pgsql-committers/2007-04/msg00125.php

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-04-10 01:22:24 Re: CREATE TABLE LIKE INCLUDING INDEXES support
Previous Message Bruce Momjian 2007-04-10 01:07:49 Re: UTF8MatchText