Re: Cannot use more than 16 attributes in an index

From: John Gray <jgray(at)azuli(dot)co(dot)uk>
To: Thomas Bolden <tbolden(at)mail(dot)state(dot)mo(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cannot use more than 16 attributes in an index
Date: 2002-08-06 18:50:21
Message-ID: 1028659824.3943.44.camel@adzuki
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2002-08-06 at 16:43, Thomas Bolden wrote:
> I have a table with 17 attributes in the primary key. When I try to create the table I get the message
> "ERROR: Cannot use more than 16 attributes in an index".
> The table description are set by a multi-state consortium. This is a make or break for Postgresql. Is there a way to increase this limit.
> I have installed Ver 7.2.1 Postgresql on FreeBSD 4.6.

This is fairly straightforward.

Assuming that you are building from source, alter the definition of
INDEX_MAX_KEYS in src/include/pg_config.h.in
i.e.
#define INDEX_MAX_KEYS 32

...and recompile. Note that you will have to use initdb again to rebuild
your database cluster, so be sure to dump any data that you want to keep
from the database.

There is no problem (other than a minor performance penalty) associated
with changing this definition.(It is quite possible that it will be
raised to 32 anyway in version 7.3)

If this isn't clear, get back in touch and someone will give clearer
instructions!

Regards

John

--
John Gray
Azuli IT
www.azuli.co.uk

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2002-08-06 18:51:03 Re: URGENT: Database keeps crashing - suspect damaged RAM
Previous Message George.T.Essig 2002-08-06 18:46:57 Re: PostgreSQL + PHP 4.2x buggy with Apache?