Re: Proposal: "Causal reads" mode for load balancing reads without stale data

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Thom Brown <thom(at)linux(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: "Causal reads" mode for load balancing reads without stale data
Date: 2016-03-14 18:38:39
Message-ID: CAEepm=18T1VdxufZRXRjcPMGe8FWtjVpU1cEtZ6JC7bgnW0WTg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 15, 2016 at 6:58 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Sun, Mar 13, 2016 at 11:50 PM, Thomas Munro
> <thomas(dot)munro(at)enterprisedb(dot)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.

Oops, thanks, fixed. I'll wait for some more feedback or a conflict
with master before sending a new version.

> - 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?

Yeah, that's silly, thanks. Tidied up for the next version.

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-03-14 18:41:27 Re: [PROPOSAL] VACUUM Progress Checker.
Previous Message Robert Haas 2016-03-14 18:30:21 Re: Obsolete comment in postgres_fdw.c