Re: WIP: Failover Slots

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: WIP: Failover Slots
Date: 2016-02-16 08:11:56
Message-ID: CAMsr+YH-ZyzsL8D7pUFbm5u9nXqdHx40CJ9ueVy-Sd3xp_ObZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 16 February 2016 at 01:23, Petr Jelinek <petr(at)2ndquadrant(dot)com> wrote:

> Hi,
>
> here is my code level review:
>
> 0001:
> This one looks ok except for broken indentation in the new notes in
> xlogreader.c and .h.

I don't see the broken indentation. Not sure what you mean.

> + while (slot->in_use && slot->active_pid == active_pid
> + && max_sleep_micros > 0)
> + {
> + usleep(micros_per_sleep);
> + max_sleep_micros -= micros_per_sleep;
> + }
>
> Not sure I buy this, what about postmaster crashes and fast shutdown
> requests etc.

Yeah. I was thinking - incorrectly - that I couldn't use a latch during
recovery.

Revision attached. There was a file missing from the patch too.

> 0003:
> There is a lot of documentation improvements here that are not related
> to failover slots or timeline following, it might be good idea to
> split those into separate patch as they are separately useful IMHO.
>

Yeah, probably worth doing. We'll see how this patch goes.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Allow-logical-slots-to-follow-timeline-switches.patch text/x-patch 19.1 KB
0002-Allow-replication-slots-to-follow-failover.patch text/x-patch 48.9 KB
0003-Add-the-UI-and-documentation-for-failover-slots.patch text/x-patch 35.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-02-16 08:13:09 Re: Remove or weaken hints about "effective resolution of sleep delays is 10 ms"?
Previous Message Robert Haas 2016-02-16 08:06:57 Re: Remove or weaken hints about "effective resolution of sleep delays is 10 ms"?