Re: GiST on 64-bit box

From: Teodor Sigaev <teodor(at)stack(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-11 20:28:59
Message-ID: 3C68298B.5060907@stack.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

We got the report about this patch on 64-bit Solaris: it's work.

Teodor Sigaev wrote:
> This patch solve the problem with unaligned access on 64-bit box. Please
> apply it for 7.2.1.
>
> Tested on DEC Alpha.
>
> Tom Lane wrote:
>
>> 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
>>
>>
>
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Teodor Sigaev
teodor(at)stack(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message noy 2002-02-11 20:29:28 Permissions problem
Previous Message Tom Lane 2002-02-11 20:02:38 Re: [HACKERS] Feature enhancement request : use of libgda