pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Oliver Jowett <oliver@opencloud.com>
Cc: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
Cc: pgsql-jdbc@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [JDBC] Optimize postgres protocol for fixed size arrays
Date: Wed, 23 Nov 2011 11:36:28 -0500
Message-ID: <27505.1322066188@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHyXU0yVXyVNBHe56Rx9VUC8NHfLN=naYokfoPLPMtUH=XCyjA@mail.gmail.com>
References: <4ECC186A.30709@nitorcreations.com>
	<CA+0W9LMJM-XjvDPcN7kQEp1O1UHtp1qoXV_n-P9nXCzZWKKg1w@mail.gmail.com>
	<4875.1322005944@sss.pgh.pa.us>
	<CAHyXU0yVXyVNBHe56Rx9VUC8NHfLN=naYokfoPLPMtUH=XCyjA@mail.gmail.com>

Merlin Moncure <mmoncure@gmail.com> writes:
> On Tue, Nov 22, 2011 at 6:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The only way that anything like this will go in is as part of a protocol
>> version bump,

> Wire format changes can only be made with a protocol version bump?  Is
> this a new policy? In the past they were just made...for example the
> money type was bumped to 64 bits.  In the past it was always buyer
> beware for binary format consumers.

Well, (a) our standards have gone up over time, (b) binary protocol is
getting more widely used (in part due to your own efforts), and (c)
money is a third-class stepchild anyway.  I don't think we can get away
with changing the binary representation of such widely used types as
int and float arrays, unless we have some pretty carefully thought
through notion of how the client and server will negotiate what to do.

Now it's possible we could do that without formally calling it a
protocol version change, but I don't care at all for the idea of coming
up with one-off hacks every time somebody decides that some feature is
important enough that they have to have it Right Now instead of waiting
for a sufficient accumulation of reasons to have a protocol flag day.
I think "but we made arrays a bit smaller!" is a pretty lame response
to have to give when somebody complains that Postgres 9.2 broke their
client software.  When we do it, I want to have a *long* list of good
reasons.

BTW, so far as the actual array format is concerned, I don't think
the proposal is acceptable as-is: it renders the received array entirely
unreadable unless the reader knows a-priori what the sender thought the
typlen was.  It would be a lot better if the fixed-length flag meant
that the typlen is given once in the array header rather than once per
element.  I'm not thrilled by the "no nulls" restriction, either,
though I admit I don't have a good idea about avoiding that offhand.

			regards, tom lane



view thread (11+ messages)  latest in thread

Message-ID: <27505.1322066188@sss.pgh.pa.us>
Permalink:  ../27505.1322066188@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27505.1322066188@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mmoncure@gmail.com, oliver@opencloud.com, mikko.tiihonen@nitorcreations.com, pgsql-hackers@postgresql.org
  Subject: Re: [JDBC] Optimize postgres protocol for fixed size arrays
  In-Reply-To: <27505.1322066188@sss.pgh.pa.us>
  References: <4ECC186A.30709@nitorcreations.com> <CA+0W9LMJM-XjvDPcN7kQEp1O1UHtp1qoXV_n-P9nXCzZWKKg1w@mail.gmail.com> <4875.1322005944@sss.pgh.pa.us> <CAHyXU0yVXyVNBHe56Rx9VUC8NHfLN=naYokfoPLPMtUH=XCyjA@mail.gmail.com> <27505.1322066188@sss.pgh.pa.us>

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

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