Craig Ringer <craig@2ndquadrant.com> writes:
> Hi all
> To support transparent client-side failover in BDR, it's necessary to
> know what the LSN of a node was at the time a transaction committed and
> keep track of that in the client/proxy.
> I'm thinking about adding a new message type in the protocol that gets
> sent immediately before CommandComplete, containing the LSN of the
> commit. Clients would need to enable the sending of this message with a
> GUC that they set when they connect, so it doesn't confuse clients that
> aren't expecting it or aware of it.
FWIW, I think it's a seriously bad idea to expose LSNs in the protocol
at all. What happens five years from now when we switch to some other
implementation that doesn't have LSNs?
I don't mind if you expose some other way to inquire about LSNs, but
let's *not* embed it into the wire protocol. Not even as an option.
This position also obviates the need to complain about having a GUC
that changes the protocol-level behavior, which is also a seriously
bad idea.
regards, tom lane