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

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: 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: 2015-11-16 18:59:00
Message-ID: CAEepm=0VvB3djXx56at8acXXb-sgY+_SkcUoPmuZtOe8c-pNDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 17, 2015 at 12:44 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:

> On 15 November 2015 at 10:41, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>
>
>> So anyway, consider me nudged to finish my patch to provide capability
>> for that by 1 Jan.
>>
>
> My earlier patch aimed to allow WALReceiver to wait on both a latch and a
> socket as well as allow WALWriter to be active, so that WALReceiver could
> reply more quickly and handle greater workload. As I explained previously
> when we discussed that in recent posts, it is necessary infrastructure to
> have anybody wait on anything higher than remote-fsync. I aim to complete
> that by 1 Jan.
>

Right, handing write/fsync work off to WALWriter in standbys makes a lot of
sense for any kind of writer-waits system, so that WALReceiver doesn't
spend time in long syscalls which wouldn't play nicely with signals
(whether from 'kill' or SetLatch) and can deal with network IO with the
lowest possible latency. I would like to help test/review that, if that
could be useful.

The SIGUSR1 code in the WalReceiverMain and WalRecvWakeup in this patch
works well enough for now for proof-of-concept purposes until then.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-11-16 19:42:54 Re: Generalizing SortSupport for text to work with char(n), bytea, and alternative opclasses
Previous Message Marco Nenciarini 2015-11-16 18:22:15 Re: pg_receivexlog: spurious error message connecting to 9.3