summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Eisentraut2016-11-30 17:00:00 +0000
committerPeter Eisentraut2016-12-02 01:23:28 +0000
commit597a87ccc9a6fa8af7f3cf280b1e24e41807d555 (patch)
treef869e194ae83b03b7174ea6c8a26565265bc893e /src/include
parentb999c247a5df4110a2ae20b01f0f686840169875 (diff)
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@2ndquadrant.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pgstat.h1
-rw-r--r--src/include/replication/walreceiver.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index 0b85b7ad3a..152ff06208 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -763,6 +763,7 @@ typedef enum
WAIT_EVENT_CLIENT_WRITE,
WAIT_EVENT_SSL_OPEN_SERVER,
WAIT_EVENT_WAL_RECEIVER_WAIT_START,
+ WAIT_EVENT_LIBPQWALRECEIVER_READ,
WAIT_EVENT_WAL_SENDER_WAIT_WAL,
WAIT_EVENT_WAL_SENDER_WRITE_DATA
} WaitEventClient;
diff --git a/src/include/replication/walreceiver.h b/src/include/replication/walreceiver.h
index cd787c92b3..afbb8d8b95 100644
--- a/src/include/replication/walreceiver.h
+++ b/src/include/replication/walreceiver.h
@@ -127,8 +127,9 @@ typedef struct
* where to start streaming (after setting receiveStart and
* receiveStartTLI), and also to tell it to send apply feedback to the
* primary whenever specially marked commit records are applied.
+ * This is normally mapped to procLatch when walreceiver is running.
*/
- Latch latch;
+ Latch *latch;
} WalRcvData;
extern WalRcvData *WalRcv;