<p dir="ltr"><br /> > I'm thinking the client should get some kind of a token back from the commit, and it could use
thetoken on the standby, to wait for that commit to be applied. The token could be just the XID, or the LSN of the
commitrecord. Or the application could generate the token and pass it to the server in the commit, similar to how 2PC
works.So the interaction would be something like:<br /> ><br /> > In master:<br /> > BEGIN;<br /> > INSERT
INTOFOO ...;<br /> > COMMIT;<br /> > Server returns: COMMITted with token 1234<br /> ><br /> > Later, in
standby:<br/> > BEGIN WAIT FOR COMMIT 1234 TO BE VISIBLE;<br /> > SELECT * FROM foo;<br /><p dir="ltr">+1.<p
dir="ltr">TheLSN should be good enough IMO.