Re: 64-bit sequences

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Paul Caskey <paul(at)nmxs(dot)com>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 64-bit sequences
Date: 2000-06-24 04:53:20
Message-ID: 20554.961822400@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:
>> Similar subject: What about making the oid 64-bit?

> Again, a 64bit vs 32 bit issue. We have "pass by value" and "pass by
> reference" data types, and we have conventionally made everything bigger
> than 32bits a "by reference" type. Going to a 64bit OID or SERIAL type
> may mess with that convention, but it may be good to revisit this and
> remind ourselves why we have that convention in the first place.

I think it would be completely impractical to convert Oid to a pass-by-
reference type --- the palloc() overhead would be intolerable. However,
on machines where it's possible to make Datum a 64-bit integer type,
we could support 64-bit Oids. On those machines where pointers are 64
bits, there wouldn't even be any performance cost because Datum has to
be 64 bits anyway.

I have actually had something like this in the back of my mind while
working on the fmgr conversion. With sufficiently disciplined use of
DatumGetFoo and FooGetDatum macros everywhere, it would become fairly
transparent whether Datum is 32 or 64 bits and whether 64-bit types
are pass-by-value or pass-by-reference. Eventually I'd like to see
compile-time options for the size of Oid and for whether int8,
float4, and float8 are pass-by-val or -by-ref. There's still a lot
of tedious code-cleanup gruntwork to be done before that can happen,
though.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kovacs Zoltan Sandor 2000-06-24 10:25:01 Re: problem with ALTER GROUP
Previous Message Tom Lane 2000-06-24 04:37:09 Re: [HACKERS] query failed , don't know why