From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Reducing walreceiver latency with a latch |
Date: | 2010-09-13 11:40:15 |
Message-ID: | 4C8E0D9F.9090601@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Now that we have the wonderful latch facility, let's use it to reduce
the delay between receiving a piece of WAL and applying in the standby.
Currently, the startup process polls every 100ms to see if new WAL has
arrived, which adds an average a 50 ms delay between a transaction
commit in the master and it appearing as committed in a hot standby
server. The latch patch eliminated a similar polling delay in walsender
already, the attached patch does the same for walreceiver.
After this patch, there is no unnecessary delays in the streaming
replication code path. Note that this is all still asynchronous, just
with reduced latency.
This is pretty straightforward, but any comments?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
walreceiver-latch-1.patch | text/x-diff | 4.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Thom Brown | 2010-09-13 11:44:38 | Re: [RRR] CommitFest 2010-07 final report |
Previous Message | Fujii Masao | 2010-09-13 10:08:44 | pg_ctl emits strange warning message |