Re: Summary of some postgres portability issues

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ken Camann <kjcamann(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Summary of some postgres portability issues
Date: 2008-07-09 07:35:49
Message-ID: 20080709073549.GB18930@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 08, 2008 at 07:01:10PM -0400, Ken Camann wrote:
> In trying to port postgres to 64-bit Windows, I've encountered a
> number of issues which may (or may not) affect other compilers. If
> you followed the other thread, this is mostly a summary with a bit
> more details so feel free to ignore it. Some of these may have some
> minor effects on other platforms, so they may be of interest (but I
> doubt it, since no one has noticed/complained about them yet).

Just clarifying for myself: you are mostly listing theoretical problems
here, not actual "I ran it and got regression failures" problems, right?

You spend some time arguing that long is the wrong type for lengths in
memory but since all Datums in postgres are limited to 1GB I don't
understand how this can be a practical problem since that can be stored
in an int and a long on any platform.

Mostly you seem to be noting that whatever compiler you are using is
much stricter than the other compilers used in the buildfarm. Clearly
neither icc nor sun studio find these problems on other 64-bit
platforms.

> Does that mean that
> almost every part of postgres that interacts with memory or the Datum
> type must be read very carefully to rediscover all the assumptions
> behind the code? Unfortunately I would guess yes.

I don't understand what you mean here: the Datum type has very clear
rules about how it is stored. It is essentially opaque, but given the
typlen you have enough information to know how to copy it for example.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Joseph Krogh 2008-07-09 07:42:18 Re: Identifier case folding notes
Previous Message Martijn van Oosterhout 2008-07-09 07:10:55 Re: [WIP] patch - Collation at database level