Wed Nov 10 20:56:02 PST 2004
- Previous message: [Slony1-commit] By cbbrowne: Update schema documentation based on latest comments
- Next message: [Slony1-commit] By cbbrowne: Fixes to RebuildListenEntries() as it was adding sl_listen
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Fixed typos, added further schema documentation to C functions
Modified Files:
--------------
slony1-engine/src/backend:
slony1_funcs.c (r1.25 -> r1.26)
slony1_funcs.sql (r1.36 -> r1.37)
-------------- next part --------------
Index: slony1_funcs.sql
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.36
retrieving revision 1.37
diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.36 -r1.37
--- src/backend/slony1_funcs.sql
+++ src/backend/slony1_funcs.sql
@@ -164,7 +164,7 @@
grant execute on function @NAMESPACE at .getLocalNodeId (name) to public;
comment on function @NAMESPACE at .getLocalNodeId (name) is
- 'not yet documented';
+ 'Returns the node ID of the node being serviced on the local database';
-- ----------------------------------------------------------------------
-- FUNCTION getModuleVersion ()
@@ -178,6 +178,8 @@
security definer;
grant execute on function @NAMESPACE at .getModuleVersion () to public;
+comment on function @NAMESPACE at .getModuleVersion () is
+ 'Returns the compiled-in version number of the Slony-I shared object';
-- ----------------------------------------------------------------------
-- FUNCTION setSessionRole (name, role)
@@ -188,8 +190,10 @@
as '$libdir/slony1_funcs', '_Slony_I_setSessionRole'
language C
security definer;
+
comment on function @NAMESPACE at .setSessionRole (name, text) is
'not yet documented';
+
grant execute on function @NAMESPACE at .setSessionRole (name, text) to public;
@@ -202,10 +206,11 @@
as '$libdir/slony1_funcs', '_Slony_I_getSessionRole'
language C
security definer;
+
comment on function @NAMESPACE at .getSessionRole (name) is
'not yet documented';
-grant execute on function @NAMESPACE at .getSessionRole (name) to public;
+grant execute on function @NAMESPACE at .getSessionRole (name) to public;
-- ----------------------------------------------------------------------
-- FUNCTION logTrigger ()
@@ -216,8 +221,11 @@
as '$libdir/slony1_funcs', '_Slony_I_logTrigger'
language C
security definer;
+
comment on function @NAMESPACE at .logTrigger () is
- 'not yet documented';
+ 'This is the trigger that is executed on the origin node that causes
+updates to be recorded in sl_log_1/sl_log_2.';
+
grant execute on function @NAMESPACE at .logTrigger () to public;
-- ----------------------------------------------------------------------
@@ -228,9 +236,9 @@
create or replace function @NAMESPACE at .terminateNodeConnections (name) returns int4
as '$libdir/slony1_funcs', '_Slony_I_terminateNodeConnections'
language C;
-comment on function @NAMESPACE at .terminateNodeConnections (name) is
- 'not yet documented';
+comment on function @NAMESPACE at .terminateNodeConnections (name) is
+ 'terminates connections to the node and terminates the process';
-- ----------------------------------------------------------------------
-- FUNCTION cleanupListener ()
@@ -241,6 +249,8 @@
as '$libdir/slony1_funcs', '_Slony_I_cleanupListener'
language C;
+comment on function @NAMESPACE at .cleanupListener() is
+ 'look for stale pg_listener entries and submit Async_Unlisten() to them';
-- **********************************************************************
-- * PL/pgSQL functions for administrative tasks
@@ -257,10 +267,10 @@
return 1;
end;
' language plpgsql;
+
comment on function @NAMESPACE at .slonyVersionMajor () is
'Returns the major version number of the slony schema';
-
-- ----------------------------------------------------------------------
-- FUNCTION slonyVersionMinor()
-- ----------------------------------------------------------------------
@@ -1780,6 +1790,13 @@
perform @NAMESPACE at .moveSet_int(p_set_id, v_local_node_id,
p_new_origin);
+ for v_sub_row in select sub_provider, sub_receiver
+ from @NAMESPACE at .sl_subscribe
+ where sub_set = p_set_id
+ loop
+ perform @NAMESPACE at .GenerateListensOnSubscribe(v_sub_row.sub_provider, v_sub_row.sub_receiver)
+ done;
+
-- ----
-- At this time we hold access exclusive locks for every table
-- in the set. But we did move the set to the new origin, so the
@@ -3646,6 +3663,11 @@
p_sub_receiver, p_sub_forward);
-- ----
+ -- Submit listen management events
+ -- ----
+ perform @NAMESPACE at .GenerateListensOnSubscribe(p_sub_provider, p_sub_receiver);
+
+ -- ----
-- Create the SUBSCRIBE_SET event
-- ----
return @NAMESPACE at .createEvent(''_ at CLUSTERNAME@'', ''SUBSCRIBE_SET'',
@@ -4512,8 +4534,8 @@
where path.pa_server = listen.li_origin and
path.pa_client = listen.li_reciever);
- -- 3. Iterate 'til we can't iterate no more...
- -- Add in indirect listens based on what's in sl_listen and sl_path
+ -- 3. Iterate until we cannot iterate any more...
+ -- Add in indirect listens based on what is in sl_listen and sl_path
v_done := ''f'';
while not v_done loop
select @NAMESPACE at .storelisten(li_origin,pa_server,pa_client)
Index: slony1_funcs.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -Lsrc/backend/slony1_funcs.c -Lsrc/backend/slony1_funcs.c -u -w -r1.25 -r1.26
--- src/backend/slony1_funcs.c
+++ src/backend/slony1_funcs.c
@@ -1005,7 +1005,7 @@
{
pid = DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[i],
SPI_tuptable->tupdesc, 1, &isnull));
- elog(NOTICE, "Slony-I: terminating DB connection of faile node "
+ elog(NOTICE, "Slony-I: terminating DB connection of failed node "
"with pid %d", pid);
kill(pid, SIGTERM);
}
- Previous message: [Slony1-commit] By cbbrowne: Update schema documentation based on latest comments
- Next message: [Slony1-commit] By cbbrowne: Fixes to RebuildListenEntries() as it was adding sl_listen
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list