pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Hernández Tortosa <aht@8Kdata.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Cc: Kevin Wooten <kdubb@me.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: Backend protocol wanted features
Date: Wed, 06 Jan 2016 01:45:56 +0100
Message-ID: <568C63C4.3040703@8Kdata.com> (raw)
In-Reply-To: <CADK3HHJo2X3dLw4NxaUS+5VWb+qKVEm3gv3DU6Q6fB2ajrgyUQ@mail.gmail.com>
References: <CAB=Je-GUO8p_yRiGkYcHRyjUHPrepjKooeqiAUwZp7pXK4igpQ@mail.gmail.com>
	<07F56911-8A74-4CBD-915B-24F851970A67@me.com>
	<56883940.2090100@8Kdata.com>
	<CADK3HHL6ZfEZfMXZfW3j8_PvEdVJ+9+OeugdzcdAMObiUVriQw@mail.gmail.com>
	<568BD1FD.6070600@8Kdata.com>
	<CAB=Je-G3cfx8X_xzxwK8Y+hL5Qqkj+WKSnMkgzBh0oed7UcnxQ@mail.gmail.com>
	<568BEA55.5040208@8Kdata.com>
	<CADK3HHJo2X3dLw4NxaUS+5VWb+qKVEm3gv3DU6Q6fB2ajrgyUQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>


On 05/01/16 17:31, Dave Cramer wrote:
>
> On 5 January 2016 at 11:07, Álvaro Hernández Tortosa <aht@8kdata.com 
> <mailto:aht@8kdata.com>> wrote:
>
>
>     On 05/01/16 15:35, Vladimir Sitnikov wrote:
>
>             So rather than asking everybody to add new messages to the
>             protocol to support this, wouldn't it be better to support
>             LD in the driver?
>
>         Well, it would still require to wrap one's mind around to get
>         that efficient.
>         You do not like to deallocate all server-prepared statements after
>         each DDL, do you?
>         On the other hand, JDBC driver does not know changes to which
>         tables/views/functions/types would impact statements prepared in
>         current session, thus JDBC driver has no idea which changes it
>         should
>         subscribe to.
>
>
>         That's a tough question whether to drop or re-create prepared
>     statements if they point to database objects that have been
>     modified. Needless to say, the naive approach is to drop them all
>     and re-create them when required. Any more clever algorithm than
>     this one would be an improvements.
>
>         However, I still fail to see how this is related to how to
>     acquire the knowledge of schema changes. Whether you get it via v4
>     protocol messages or LD, either way, you have the same problem
>     with the prepared statements. And, in any case, if schema changes
>     were to be implemented as part of the protocol, it would surely be
>     push messages sent asynchronously. Not that different from
>     consuming LD.
>
>         My point is that I envision strong opposition to add duplicate
>     functionality. If schema changes could be obtained from LD, I
>     presume there will be opposition to *also* add it to the protocol
>     just because it may not be a great fit for the JDBC driver.
>
>
> This is a systemic problem that we need to figure out. JDBC is 
> arguably one of the top clients for PostgreSQL, but seems to be 
> treated by a second class citizen. I don't think it should be 
> necessary to make a second connection to the backend just to get 
> schema changes.

     If anything, I am a really strong defender of Java and Postgres. So 
I would never allow it to be considered a second class citizen. However, 
I'm unsure pushing "our" requirements to a broader support for everybody 
*when* that can be obtained by other means, may not be enough justification.

     There are other parts of the protocol that require a separate 
connection. Those I don't like either, but it's not unheard of. Maybe 
the solution is different: that LD may be consumed within the same 
connection (if that would be possible).

     In any case, it won't be me rejecting that messages informing of 
schema changes, of course not. I just think they belong more to LD anyway :)

     Álvaro

-- 
Álvaro Hernández Tortosa


-----------
8Kdata

view thread (23+ messages)  latest in thread

Message-ID: <568C63C4.3040703@8Kdata.com>
Permalink:  ../568C63C4.3040703@8Kdata.com/
Also on:    postgresql.org/message-id/568C63C4.3040703@8Kdata.com

 · 

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: aht@8Kdata.com, pg@fastcrypt.com, sitnikov.vladimir@gmail.com, kdubb@me.com
  Subject: Re: Backend protocol wanted features
  In-Reply-To: <568C63C4.3040703@8Kdata.com>
  References: <CAB=Je-GUO8p_yRiGkYcHRyjUHPrepjKooeqiAUwZp7pXK4igpQ@mail.gmail.com> <07F56911-8A74-4CBD-915B-24F851970A67@me.com> <56883940.2090100@8Kdata.com> <CADK3HHL6ZfEZfMXZfW3j8_PvEdVJ+9+OeugdzcdAMObiUVriQw@mail.gmail.com> <568BD1FD.6070600@8Kdata.com> <CAB=Je-G3cfx8X_xzxwK8Y+hL5Qqkj+WKSnMkgzBh0oed7UcnxQ@mail.gmail.com> <568BEA55.5040208@8Kdata.com> <CADK3HHJo2X3dLw4NxaUS+5VWb+qKVEm3gv3DU6Q6fB2ajrgyUQ@mail.gmail.com> <568C63C4.3040703@8Kdata.com>

* 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