Skip site navigation (1) Skip section navigation (2)

Re: pgsql: Use a latch to make startup process wake up and replay

From: Thom Brown <thom(at)linux(dot)com>
To: Heikki Linnakangas <heikki(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Use a latch to make startup process wake up and replay
Date: 2010-09-15 11:48:44
Message-ID: AANLkTi=pHDCLkSxcbCYdqis5UCxDa2okrU0N57NH3rKF@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
On 15 September 2010 11:35, Heikki Linnakangas <heikki(at)postgresql(dot)org> wrote:
> Log Message:
> -----------
> Use a latch to make startup process wake up and replay immediately when
> new WAL arrives via streaming replication. This reduces the latency, and
> also allows us to use a longer polling interval, which is good for energy
> efficiency.
>
> We still need to poll to check for the appearance of a trigger file, but
> the interval is now 5 seconds (instead of 100ms), like when waiting for
> a new WAL segment to appear in WAL archive.
>
> Modified Files:
> --------------
>    pgsql/src/backend/access/transam:
>        xlog.c (r1.434 -> r1.435)
>        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.434&r2=1.435)
>    pgsql/src/backend/replication:
>        walreceiver.c (r1.16 -> r1.17)
>        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/walreceiver.c?r1=1.16&r2=1.17)
>    pgsql/src/include/access:
>        xlog.h (r1.116 -> r1.117)
>        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlog.h?r1=1.116&r2=1.117)
>
> --

+ 	 * We don't need the latch anymore. It's not strictly necessary to disown
+ 	 * it, but let's do it for the sake of tidyness.
+ 	 */

s/tidyness/tidiness/

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2010-09-15 12:23:52
Subject: Re: Sync Replication with transaction-controlled durability
Previous:From: Fujii MasaoDate: 2010-09-15 11:14:33
Subject: Re: pgsql: Use a latch to make startup process wake up and replay

pgsql-committers by date

Next:From: Tom LaneDate: 2010-09-15 13:55:30
Subject: Latches, signals, and waiting
Previous:From: Fujii MasaoDate: 2010-09-15 11:14:33
Subject: Re: pgsql: Use a latch to make startup process wake up and replay

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group