Chris Browne cbbrowne at lists.slony.info
Wed May 28 11:13:07 PDT 2008
Update of /home/cvsd/slony1/slony1-engine/src/slonik
In directory main.slony.info:/tmp/cvs-serv15149/slonik

Modified Files:
	slonik.c 
Log Message:
Change reference to pg_listener to use combination of sl_nodelock +
pg_stat_activity, as pg_listener is to go away in PG 8.4.


Index: slonik.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slonik/slonik.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -C2 -d -r1.89 -r1.90
*** slonik.c	26 May 2008 18:48:51 -0000	1.89
--- slonik.c	28 May 2008 18:13:05 -0000	1.90
***************
*** 2465,2470 ****
  		slon_mkquery(&query,
  					 "lock table \"_%s\".sl_config_lock; "
! 					 "select listenerpid from \"pg_catalog\".pg_listener "
! 					 "    where relname = '_%s_Restart'; ",
  					 stmt->hdr.script->clustername,
  					 stmt->hdr.script->clustername);
--- 2465,2474 ----
  		slon_mkquery(&query,
  					 "lock table \"_%s\".sl_config_lock; "
! 					 "select nl_backendpid from \"_%s\".sl_nodelock "
! 					 "    where nl_nodeid = \"_%s\".getLocalNodeId('_%s') and "
! 					 "       exists (select 1 from pg_catalog.pg_stat_activity "
! 					 "                 where procpid = nl_backendpid);"
! 					 stmt->hdr.script->clustername,
! 					 stmt->hdr.script->clustername,
  					 stmt->hdr.script->clustername,
  					 stmt->hdr.script->clustername);
***************
*** 2592,2596 ****
  
  	/*
! 	 * Wait until all slon replication engines that where running have
  	 * restarted.
  	 */
--- 2596,2600 ----
  
  	/*
! 	 * Wait until all slon replication engines that were running have
  	 * restarted.
  	 */
***************
*** 2609,2615 ****
  
  			slon_mkquery(&query,
! 						 "select listenerpid from \"pg_catalog\".pg_listener "
! 						 "    where relname = '_%s_Restart' "
! 						 "    and listenerpid <> %d; ",
  						 stmt->hdr.script->clustername,
  						 nodeinfo[i].slon_pid);
--- 2613,2618 ----
  
  			slon_mkquery(&query,
! 						 "select nl_backendpid from \"_%s\".sl_nodelock "
! 						 "    where nl_backendpid <> %d; ",
  						 stmt->hdr.script->clustername,
  						 nodeinfo[i].slon_pid);



More information about the Slony1-commit mailing list