3 ms·
Right; but you have to implement it yourself, and you'll know the limitations (e.g. it'll probably be expensive to notify on changes to complex queries and/or o
by virgilp 8y ago
Right; but you have to implement it yourself, and you'll know the limitations (e.g. it'll probably be expensive to notify on changes to complex queries and/or on many queries).
- pritambaral 8y agoI actually implemented this (i.e, your parent's idea) for a product. Took me an afternoon to read the documentation and source of the logical output plugin and build a logical replication receiver (using the guts of an existing binary-protocol driver). Of course, that is a testament to the quality of the documentation and the source code of PostgreSQL. The fact that the Logical Decoding and Logical Output features were built for replication means that some decisions were taken not-in-favour of publishing changes, obviously, but it works pleasantly and straightforwardly. Even writing a custom logical output plugin would be simple, because Pg does all the transaction tracking, position tracking, change decoding etc.