pgsql: Use latch instead of select() in walreceiver

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use latch instead of select() in walreceiver
Date: 2016-12-02 01:29:49
Message-ID: E1cCcfd-0008G5-2z@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Use latch instead of select() in walreceiver

Replace use of poll()/select() by WaitLatchOrSocket(), which is more
portable and flexible.

Also change walreceiver to use its procLatch instead of a custom latch.

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/597a87ccc9a6fa8af7f3cf280b1e24e41807d555

Modified Files
--------------
src/backend/postmaster/pgstat.c | 3 +
.../libpqwalreceiver/libpqwalreceiver.c | 101 +++++----------------
src/backend/replication/walreceiver.c | 18 ++--
src/backend/replication/walreceiverfuncs.c | 6 +-
src/include/pgstat.h | 1 +
src/include/replication/walreceiver.h | 3 +-
6 files changed, 43 insertions(+), 89 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2016-12-02 01:50:30 Re: pgsql: Use latch instead of select() in walreceiver
Previous Message Peter Eisentraut 2016-12-01 22:39:20 pgsql: Add aggregate_with_argtypes and use it consistently

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-12-02 01:31:38 Re: Broken SSL tests in master
Previous Message Michael Paquier 2016-12-02 01:28:11 Re: Proposal for changes to recovery.conf API