Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> Something like registering/deregistering also doesn't fit that
> well with the way walsender works as far as I understand it.
If you look at the diagrams on the xReader Wiki page, the lines
labeled "XLOG stream" are the ones using walsender/walreceiver. The
green arrows represent normal connections to the database, to run
queries to retrieve metadata needed to interpret the WAL records,
and the lines labeled "Listener n" are expected to use the pg
protocol to connect, but won't be talking page-oriented WAL -- they
will be dealing with logical interpretation of the WAL. The sort of
data which could be fed to a database which doesn't have the same
page images. Like Slony et al do.
Perhaps, given other points you made, the library for interpreting
the WAL records could be shared, and hopefully a protocol for the
clients, although that seems a lot more muddy to me at this point.
If we can share enough code, there may be room for both approaches
with minimal code duplication.
-Kevin