Re: [HACKERS] Number of index fields configurable

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Number of index fields configurable
Date: 2000-01-10 15:54:31
Message-ID: 3334.947519671@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> OK, different solution. I decided there is no need to be dumping out
> zeros to pad the type.

Oh, that's a thought. You haven't really gained anything in generality,
since the code is still treating zero as a special case; but I agree it
looks nicer (and is easier to check for too many values).

Only worry I have is whether it will interoperate comfortably with the
old code. Let's see:

* old dump to new: no problem, unless you've reduced MAX_INDEX_KEYS
below 8 (doesn't seem likely).

* new to old: fails for every case except where there's exactly 8
non zero entries.

The latter is a bit bothersome, but may not be a big deal --- in reality
we don't dump and reload pg_index this way.

BTW, be sure you are only suppressing *trailing* zeroes not *embedded*
zeroes. I know that oid8 has to deal with embedded zeroes (some of
the pg_proc entries look like that); int28 might not, but the code
should probably act the same for both.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-01-10 15:59:46 Re: [HACKERS] Number of index fields configurable
Previous Message Tom Lane 2000-01-10 15:44:07 Potential vacuum bug?