Use latch instead of select() in walreceiver
Peter Eisentraut <peter_e@gmx.net>
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>
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/postmaster/pgstat.c | modified | +3 −0 |
| src/backend/replication/libpqwalreceiver/libpqwalreceiver.c | modified | +24 −77 |
| src/backend/replication/walreceiver.c | modified | +10 −8 |
| src/backend/replication/walreceiverfuncs.c | modified | +3 −3 |
| src/include/pgstat.h | modified | +1 −0 |
| src/include/replication/walreceiver.h | modified | +2 −1 |