agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Jolly Chen <jolly@postgres.Berkeley.EDU>
To: Jolly Chen <jolly@postgres.Berkeley.EDU>
Cc: rjt@rivers.dra.hmg.gb
Cc: postgres95@postgres.Berkeley.EDU
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: Endian problems with P95
Date: Fri, 26 May 1995 15:48:05 -0700
Message-ID: <199505262248.PAA06732@arcadia.CS.Berkeley.EDU> (raw)
In-Reply-To: <199505261650.JAA05431@arcadia.CS.Berkeley.EDU>


> > 
> > We are having problems with postgres95. When the postmaster is compiled on 
> > a big endian machine only monitors compiled and run on big endian a machine
> > can talk to it. When the postmaster is compiled on a little endian machine
> > only monitors compiled and run on little endian a machine can talk to it.
> > 
> > Has anyone else experienced this problem ?
> > 
> 
> This is a problem that is common to both postgres and postgres95.  The
> frontend/backend protocol does not use an architectural neutral format.
> For that matter, the data in the database is not stored in an
> architectural neutral format, either.  What this means is that you
> cannot use client/servers with different word-sizes or different
> endian representation.
> 

Egg on my face!  I have to retract what I said.  Postgres is actually
smart about transferring integers between the frontends and backends so
that heterogeneous clients and servers can connect and transfer data in
ASCII.  (We chop the integer up into bytes and transfer it a byte at a
time and reconstruct the integer when we receive it) Postgres95 broke
this for the initial startup message that is sent between the frontend
to the backend.  We've fixed this and posted a patch to our home page
about it.

The data that is stored in your database is still stored in the native
format of the server, not in a neutral format.  However, if you are
always retrieving tuples out in ASCII and storing tuples in ASCII from
your front-end, then you are safe.  If you use binary portals, then you
will get the binary representation of the sending host. 

I'm very sorry about the confusion.

- Jolly Chen

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: jolly@postgres.Berkeley.EDU, rjt@rivers.dra.hmg.gb, postgres95@postgres.Berkeley.EDU
  Subject: Re: Endian problems with P95
  In-Reply-To: <199505262248.PAA06732@arcadia.CS.Berkeley.EDU>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox