From: | Atri Sharma <atri(dot)jiit(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com> |
Subject: | Re: Proposal: "Causal reads" mode for load balancing reads without stale data |
Date: | 2015-11-11 08:52:10 |
Message-ID: | CAOeZVicJCMj=0_JsdGA7=MObTM5YPHtWMw5VY6YBOE7gAiSd=A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> I'm thinking the client should get some kind of a token back from the
commit, and it could use the token on the standby, to wait for that commit
to be applied. The token could be just the XID, or the LSN of the commit
record. 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:
>
> In master:
> BEGIN;
> INSERT INTO FOO ...;
> COMMIT;
> Server returns: COMMITted with token 1234
>
> Later, in standby:
> BEGIN WAIT FOR COMMIT 1234 TO BE VISIBLE;
> SELECT * FROM foo;
+1.
The LSN should be good enough IMO.
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2015-11-11 09:22:11 | Re: Proposal: "Causal reads" mode for load balancing reads without stale data |
Previous Message | Heikki Linnakangas | 2015-11-11 08:42:55 | Re: Proposal: "Causal reads" mode for load balancing reads without stale data |