Thread: still lost: Cannot use more than 16 attributes in an index

still lost: Cannot use more than 16 attributes in an index

From
"Bolden, Thomas"
Date:
Ok I edited /usr/local/include/pg_config.h (FreeBSD not linux) to
#define INDEX_MAX_KEYS 32

used initdb to create a new database cluster and I still get

"ERROR: Cannot use more than 16 attributes in an index"

Then I use "make deinstall" to remove postgresql , renamed
/usr/local/pgsql/data to data.old and rebooted.  Changed to
/usr/ports/databases/postgresql7 and used "make".  Edited
/usr/ports/databases/postgresql7/work/postgresql-7.2.1/src/includes/pg_confi
g.h.in then used "make install".  Checked  /usr/local/include/pg_config.h
and it showed #define INDEX_MAX_KEYS 32.

Ran "su -l pgsql -c initdb".

Then edited /usr/local/etc/rc.d/010.pgsql.sh to include -o "-i" for remote
connection.

executed  /usr/local/etc/rc.d/010.pgsql.sh start

"su pgsql" "createdb ALMIS".  Then edited /usr/local/pgsql/data/pg_hba.conf


connected and ran sql statement to create the new table.  still the same
error.  logged in locally , typed in the same statement and get the same
error.

Is there a problem with the FreeBSD port.





Thomas Bolden
Department of Economic Development
GIS Programmer
(573) 751-3672
tbolden@ded.state.mo.us




Re: still lost: Cannot use more than 16 attributes in an

From
Joe Conway
Date:
Bolden, Thomas wrote:
> Ok I edited /usr/local/include/pg_config.h (FreeBSD not linux) to
> #define INDEX_MAX_KEYS 32
>
> used initdb to create a new database cluster and I still get
>
> "ERROR: Cannot use more than 16 attributes in an index"
>
> Then I use "make deinstall" to remove postgresql , renamed
> /usr/local/pgsql/data to data.old and rebooted.  Changed to
> /usr/ports/databases/postgresql7 and used "make".  Edited
> /usr/ports/databases/postgresql7/work/postgresql-7.2.1/src/includes/pg_confi
> g.h.in then used "make install".  Checked  /usr/local/include/pg_config.h
> and it showed #define INDEX_MAX_KEYS 32.

I think you want something like:

Edit /path/to/postgresql-source/src/includes/pg_config.h.in:
     #define INDEX_MAX_KEYS 32

Then:
/usr/local/etc/rc.d/010.pgsql.sh stop
cd /path/to/postgresql-source
./configure --your-configure-options
make all
make install
initdb -D /path/to/postgresql-data
/usr/local/etc/rc.d/010.pgsql.sh start

HTH,

Joe


Re: still lost: Cannot use more than 16 attributes in an

From
Tom Lane
Date:
Joe Conway <mail@joeconway.com> writes:
> I think you want something like:
> ...
> ./configure --your-configure-options
> make all
> make install

Also, if you had already built in that source tree, don't forget to do
"make clean" before the "make all".  Else the executables won't actually
get rebuilt.

            regards, tom lane

Re: still lost: Cannot use more than 16 attributes in an index

From
Richard Huxton
Date:
On Wednesday 07 Aug 2002 4:47 pm, Bolden, Thomas wrote:
> Then I use "make deinstall" to remove postgresql , renamed
> /usr/local/pgsql/data to data.old and rebooted.
> Changed to
> /usr/ports/databases/postgresql7 and used "make".
> Edited
> /usr/ports/databases/postgresql7/work/postgresql-7.2.1/src/includes/pg_conf
>i g.h.in
> then used "make install".  Checked  /usr/local/include/pg_config.h
> and it showed #define INDEX_MAX_KEYS 32.

Are you sure these steps are in the right order? Seems to me you want to edit
the value *before* you use make. Otherwise it'll compile in the old value,
then the new value will get copied over during the install - hence the
confusion.

- Richard Huxton