Re: [SQL] RewriteDefine.c : Rule size

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Rowan <jmr(at)computing(dot)com>
Cc: jwieck(at)debis(dot)com (Jan Wieck), ertz(at)illite(dot)u-strasbg(dot)fr (Olivier Ertz), pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] RewriteDefine.c : Rule size
Date: 1999-07-09 14:24:05
Message-ID: 2314.931530245@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Jim Rowan <jmr(at)computing(dot)com> writes:
> First we multiplied it * 4. This improved the ability to handle complex
> rules, but didn't go far enough... (it still wouldn't handle all of what we
> wanted it to).

> So we multiplied it * 8. Initdb complained about "float4 not
> defined".

There is a poorly-documented restriction that BLCKSZ can't exceed 32K
(IIRC, this is because block offsets are stored in signed shorts somewhere).
Probably would be a good idea to mention this in the comments in
config.h.in.

For the long run it would be nice to remove the restriction. I have no
idea whether that would be easy or hard. Ideally we could do something
like

#if BLCKSZ > 32767
typedef int BlockOffset;
#else
typedef short BlockOffset;
#endif

but finding all the places that need to use the typedef might be a pain.

regards, tom lane

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 1999-07-09 16:45:43 Re: Good Optimization
Previous Message John Ridout 1999-07-09 10:56:23 RE: [SQL] Good Optimization