/* Prototypes for interface functions */
-static void libpqrcv_connect(char *conninfo);
-static char *libpqrcv_get_conninfo(void);
-static void libpqrcv_identify_system(TimeLineID *primary_tli);
-static void libpqrcv_readtimelinehistoryfile(TimeLineID tli, char **filename, 
char **content, int *len);
-static bool libpqrcv_startstreaming(TimeLineID tli, XLogRecPtr startpoint,
-                                               char *slotname);
-static void libpqrcv_endstreaming(TimeLineID *next_tli);
-static int     libpqrcv_receive(char **buffer, pgsocket *wait_fd);
-static void libpqrcv_send(const char *buffer, int nbytes);
-static void libpqrcv_disconnect(void);
+static WalReceiverConn *libpqrcv_connect(char *conninfo,
 bool logical, const char *appname);
+static char *libpqrcv_get_conninfo(WalReceiverConn *conn);
+static char *libpqrcv_identify_system(WalReceiverConn *conn,
TimeLineID *primary_tli);
+static void libpqrcv_readtimelinehistoryfile(WalReceiverConn *conn,
+                                                                TimeLineID 
tli, char **filename,
+                                                                char 
**content, int *len);
+static bool libpqrcv_startstreaming(WalReceiverConn *conn,
+                                                        TimeLineID tli, 
XLogRecPtr startpoint,
+                                                        const char *slotname);
+static void libpqrcv_endstreaming(WalReceiverConn *conn,
+                                                                 TimeLineID 
+static int     libpqrcv_receive(WalReceiverConn *conn, char **buffer,
+                                                        pgsocket *wait_fd);
+static void libpqrcv_send(WalReceiverConn *conn, const char *buffer,
+                                                 int nbytes);
+static void libpqrcv_disconnect(WalReceiverConn *conn);

That looks good.

 /* Prototypes for private functions */
-static bool libpq_select(int timeout_ms);
+static bool libpq_select(PGconn *streamConn,
+                                                int timeout_ms);

If we're starting to use this more widely, we really should just a latch
instead of the plain select(). In fact, I think it's more or less a bug
that we don't (select is only interruptible by signals on a subset of
our platforms).  That shouldn't bother this patch, but...

This looks pretty close to committable, Peter do you want to do that, or
should I?


Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to