Re: Backend protocol wanted features - Mailing list pgsql-jdbc

From Sehrope Sarkuni
Subject Re: Backend protocol wanted features
Date
Msg-id CAH7T-aqYH4fCcG81Gtsx+ppBOaSU6FGaKsR_BO8850WR_0A2Jg@mail.gmail.com
Whole thread Raw
In response to Re: Backend protocol wanted features  (Álvaro Hernández Tortosa <aht@8Kdata.com>)
List pgsql-jdbc
On Tue, Jan 5, 2016 at 7:45 PM, Álvaro Hernández Tortosa <aht@8kdata.com> wrote:
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).

Why not use the existing LISTEN/NOTIFY infrastructure for this? If there were a reserved namespace (ex: pg_% or pg_schema_%) then the existing protocol could be used to listen for schema changes.

There would still need to be backend support for publishing those changes but it'd be backwards compatible in both directions; it wouldn't break existing clients and a modern client that issued a LISTEN for those changes could work with an older backend that doesn't support it (it just won't receive any notifications).

Full support for something like this would require well defined message types to indicate what changed. For an initial version it might be easier to just have a "something changed" message without the specifics of which relations where impacted. A client could invalidate all prepared statements associated with the connection.

Just my 2 cents...

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

pgsql-jdbc by date:

Previous
From: Álvaro Hernández Tortosa
Date:
Subject: Re:
Next
From: Pavel Raiskup
Date:
Subject: Re: [pgjdbc] Implement JDBC specs via pre-processor step (#435)