Tue Dec 6 21:35:05 PST 2005
- Previous message: [Slony1-commit] By wieck: Restructuring of the sync_helper thread in preparation for
- Next message: [Slony1-commit] By wieck: Fix for the exzessive memory allocation problem when
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Remove pg_listener activity for event confirmations - this can
be expected to diminish pg_listener "traffic" by at least 50%.
Poll each time an event is processed, instead.
Modified Files:
--------------
slony1-engine/src/slon:
remote_listen.c (r1.25 -> r1.26)
-------------- next part --------------
Index: remote_listen.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/remote_listen.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -Lsrc/slon/remote_listen.c -Lsrc/slon/remote_listen.c -u -w -r1.25 -r1.26
--- src/slon/remote_listen.c
+++ src/slon/remote_listen.c
@@ -99,7 +99,7 @@
dstring_init(&query1);
sprintf(conn_symname, "node_%d_listen", node->no_id);
- sprintf(notify_confirm, "_%s_Confirm", rtcfg_cluster_name);
+/* sprintf(notify_confirm, "_%s_Confirm", rtcfg_cluster_name); */
/*
* Work until doomsday
@@ -230,8 +230,8 @@
*/
slon_mkquery(&query1,
"listen \"_%s_Event\"; "
- "listen \"_%s_Confirm\"; "
- "select %s.registerNodeConnection(%d); ",
+ /* skip confirms "listen \"_%s_Confirm\"; " */
+ "select _%s.registerNodeConnection(%d); ",
rtcfg_cluster_name, rtcfg_cluster_name,
rtcfg_namespace, rtcfg_nodeid);
res = PQexec(dbconn, dstring_data(&query1));
@@ -319,8 +319,10 @@
* queue them into the remote worker for storage in our local
* database.
*/
- if (forward_confirm)
- {
+
+ /* Initially: Let's just blindly check... */
+ /* if (forward_confirm)
+ { */
rc = remoteListen_forward_confirm(node, conn);
if (rc < 0)
{
@@ -335,8 +337,8 @@
continue;
}
- forward_confirm = false;
- }
+ /* forward_confirm = false; */
+ /* } */
/*
* Wait for notification.
@@ -351,6 +353,7 @@
* Set the forward_confirm flag if there was any Confirm notification
* sent.
*/
+/* Don't bother doing anything about CONFIRM notifications
PQconsumeInput(dbconn);
while ((notification = PQnotifies(dbconn)) != NULL)
{
@@ -358,6 +361,7 @@
forward_confirm = true;
PQfreemem(notification);
}
+*/
}
/*
- Previous message: [Slony1-commit] By wieck: Restructuring of the sync_helper thread in preparation for
- Next message: [Slony1-commit] By wieck: Fix for the exzessive memory allocation problem when
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list