Re: Backend protocol wanted features
От | Sehrope Sarkuni |
---|---|
Тема | Re: Backend protocol wanted features |
Дата | |
Msg-id | CAH7T-aqYH4fCcG81Gtsx+ppBOaSU6FGaKsR_BO8850WR_0A2Jg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Backend protocol wanted features (Álvaro Hernández Tortosa <aht@8Kdata.com>) |
Список | pgsql-jdbc |
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...
В списке pgsql-jdbc по дате отправления: