Re: GiST on 64-bit box

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Teodor Sigaev <teodor(at)stack(dot)net>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: GiST on 64-bit box
Date: 2002-02-08 18:07:02
Message-ID: 24697.1013191622@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Actually, there is a third possibility, which would fix the problem
without requiring any changes in the picksplit functions. You could
do this:

char *storage;

storage = palloc(MAXALIGN(VARHDRSZ) + (*len + 1) * sizeof(GISTENTRY));
entryvec = (bytea *) (storage + MAXALIGN(VARHDRSZ) - VARHDRSZ);

use entryvec as before, except final pfree is pfree(storage)

Grotty as heck, but probably the right answer for 7.2.1 to avoid the
initdb issues.

For 7.3 we could do it the other, cleaner way.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-02-08 18:09:47 Re: PostgreSQL 7.2 on SlashDot
Previous Message Peter Eisentraut 2002-02-08 18:01:17 Maintaining the list of release changes