1- $PostgreSQL: pgsql/src/backend/replication/README,v 1.2 2010/01/20 09:16:24 heikki Exp $
1+ $PostgreSQL: pgsql/src/backend/replication/README,v 1.3 2010/03/24 06:25:39 heikki Exp $
22
33Walreceiver - libpqwalreceiver API
44----------------------------------
@@ -17,11 +17,14 @@ Establish connection to the primary, and starts streaming from 'startpoint'.
1717Returns true on success.
1818
1919
20- bool walrcv_receive(int timeout, XLogRecPtr *recptr, char **buffer, int *len)
21-
22- Retrieve any WAL record available through the connection, blocking for
23- maximum of 'timeout' ms.
20+ bool walrcv_receive(int timeout, unsigned char *type, char **buffer, int *len)
2421
22+ Retrieve any message available through the connection, blocking for
23+ maximum of 'timeout' ms. If a message was successfully read, returns true,
24+ otherwise false. On success, a pointer to the message payload is stored in
25+ *buffer, length in *len, and the type of message received in *type. The
26+ returned buffer is valid until the next call to walrcv_* functions, the
27+ caller should not attempt freeing it.
2528
2629void walrcv_disconnect(void);
2730