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

From Amit Langote
Subject Re: Proposal: "Causal reads" mode for load balancing reads without stale data
Date
Msg-id 56B1CF9C.9070507@lab.ntt.co.jp
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
Hi Thomas,

On 2016/01/20 13:12, Thomas Munro wrote:
> That one conflicts with b1a9bad9e744857291c7d5516080527da8219854, so
> here is a new version.

-    if (walsndctl->lsn[SYNC_REP_WAIT_WRITE] < MyWalSnd->write)
+    if (is_highest_priority_sync_standby)

[ ... ]

-    if (walsndctl->lsn[SYNC_REP_WAIT_FLUSH] < MyWalSnd->flush)
-    {
-        walsndctl->lsn[SYNC_REP_WAIT_FLUSH] = MyWalSnd->flush;
-        numflush = SyncRepWakeQueue(false, SYNC_REP_WAIT_FLUSH);

[ ... ]

+        if (walsndctl->lsn[SYNC_REP_WAIT_FLUSH] < MyWalSnd->write)
+        {
+            walsndctl->lsn[SYNC_REP_WAIT_FLUSH] = MyWalSnd->flush;
+            numflush = SyncRepWakeQueue(false, SYNC_REP_WAIT_FLUSH,
+                                        MyWalSnd->flush);

There seems to be a copy-pasto there - shouldn't that be:

+ if (walsndctl->lsn[SYNC_REP_WAIT_FLUSH] < MyWalSnd->flush)

Thanks,
Amit





pgsql-hackers by date:

Previous
From: Peter Moser
Date:
Subject: Development with Eclipse - Wrong error messages in IDE
Next
From: Etsuro Fujita
Date:
Subject: Re: Optimization for updating foreign tables in Postgres FDW