Re: WIP: Failover Slots - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: WIP: Failover Slots
Date
Msg-id CAMsr+YH-ZyzsL8D7pUFbm5u9nXqdHx40CJ9ueVy-Sd3xp_ObZg@mail.gmail.com
Whole thread Raw
In response to Re: WIP: Failover Slots  (Petr Jelinek <petr@2ndquadrant.com>)
Responses Re: WIP: Failover Slots
List pgsql-hackers


On 16 February 2016 at 01:23, Petr Jelinek <petr@2ndquadrant.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

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Remove or weaken hints about "effective resolution of sleep delays is 10 ms"?
Next
From: Andres Freund
Date:
Subject: Re: Remove or weaken hints about "effective resolution of sleep delays is 10 ms"?