Chris Browne cbbrowne at lists.slony.info
Fri Feb 2 12:23:48 PST 2007
Update of /home/cvsd/slony1/slony1-engine/src/slon
In directory main:/tmp/cvs-serv30435/src/slon

Modified Files:
      Tag: REL_1_2_STABLE
	confoptions.c remote_listen.c 
Log Message:
Added a new conf file option for slon - remote_listen_timeout

This helps if you have a slon down for a Very Long Time so that sl_event
bloats and causes the query on it to time out.



Index: remote_listen.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_listen.c,v
retrieving revision 1.31.2.2
retrieving revision 1.31.2.3
diff -C2 -d -r1.31.2.2 -r1.31.2.3
*** remote_listen.c	27 Oct 2006 20:09:56 -0000	1.31.2.2
--- remote_listen.c	2 Feb 2007 20:23:46 -0000	1.31.2.3
***************
*** 67,70 ****
--- 67,71 ----
  
  extern char *lag_interval;
+ int remote_listen_timeout;
  
  /* ----------
***************
*** 734,738 ****
  	}
  	time(&timeout);
! 	timeout += 300;
  	while (PQisBusy(conn->dbconn) != 0)
  	{
--- 735,739 ----
  	}
  	time(&timeout);
! 	timeout += remote_listen_timeout;
  	while (PQisBusy(conn->dbconn) != 0)
  	{
***************
*** 741,746 ****
  		{
  			slon_log(SLON_ERROR,
! 					 "remoteListenThread_%d: timeout for event selection\n",
! 					 node->no_id);
  			dstring_free(&query);
  			return -1;
--- 742,747 ----
  		{
  			slon_log(SLON_ERROR,
! 				 "remoteListenThread_%d: timeout (%d s) for event selection\n",
! 				 node->no_id, remote_listen_timeout);
  			dstring_free(&query);
  			return -1;

Index: confoptions.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/confoptions.c,v
retrieving revision 1.17.2.3
retrieving revision 1.17.2.4
diff -C2 -d -r1.17.2.3 -r1.17.2.4
*** confoptions.c	27 Oct 2006 20:09:56 -0000	1.17.2.3
--- confoptions.c	2 Feb 2007 20:23:46 -0000	1.17.2.4
***************
*** 681,684 ****
--- 681,699 ----
  		1073741824					/* max val */
  	},
+ 
+ 	{
+ 		{
+ 			(const char *)"remote_listen_timeout",		/* conf name */
+ 			gettext_noop("How long to wait, in seconds, before timeout when querying for remote events"),		/* short desc */
+ 			gettext_noop("How long to wait, in seconds, before timeout when querying for remote events"),		/* long desc */
+ 			SLON_C_INT			/* config type */
+ 		},
+ 		&remote_listen_timeout,			/* var name */
+ 		300,					/* default val */
+ 		30,					/* min val */
+ 		30000					/* max val */
+ 	},
+ 
+ 
  	{{0}}
  };




More information about the Slony1-commit mailing list