Re: Proposal: "Causal reads" mode for load balancing reads without stale data - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Proposal: "Causal reads" mode for load balancing reads without stale data
Date
Msg-id CA+TgmoaH-JTVihNnO8UdLOVcqrcdNfcOCcWCSaeKp3bBErPsJw@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: "Causal reads" mode for load balancing reads without stale data  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: Proposal: "Causal reads" mode for load balancing reads without stale data
List pgsql-hackers
On Sun, Mar 13, 2016 at 11:50 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> The last patches I posted don't apply today due to changes in master,
> so here's a freshly merged patch series.

+        from the current synchronous stanbyindicates it has received the

Uh, no.

-    SyncRepWaitForLSN(gxact->prepare_end_lsn);
+    {
+        /*
+         * Don't wait for the prepare to be applied remotely in remote_apply
+         * mode, just wait for it to be flushed to the WAL.  We will wait for
+         * apply when the transaction eventuallly commits or aborts.
+         */
+        if (synchronous_commit == SYNCHRONOUS_COMMIT_REMOTE_APPLY)
+            assign_synchronous_commit(SYNCHRONOUS_COMMIT_REMOTE_FLUSH, NULL);
+
+        SyncRepWaitForLSN(gxact->prepare_end_lsn);
+
+        if (synchronous_commit == SYNCHRONOUS_COMMIT_REMOTE_APPLY)
+            assign_synchronous_commit(SYNCHRONOUS_COMMIT_REMOTE_APPLY, NULL);
+    }

What's with the extra block?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Reworks of CustomScan serialization/deserialization
Next
From: David Steele
Date:
Subject: Re: [PATCH] we have added support for box type in SP-GiST index