bdr: Rename bdr_launch_apply_workers() to maintain_db_workers().
authorAndres Freund <andres@anarazel.de>
Mon, 9 Feb 2015 02:37:08 +0000 (03:37 +0100)
committerAndres Freund <andres@anarazel.de>
Thu, 12 Feb 2015 09:16:59 +0000 (10:16 +0100)
Also remove a superflous argument that could only ever be set to to
MyDatabaseId.

bdr.h
bdr_init_replica.c
bdr_perdb.c

diff --git a/bdr.h b/bdr.h
index 65f44f6a564d9344a13a6cfdaf7e8a46b607430f..f8943e77d993339b1d240fef152e759238d37bea 100644 (file)
--- a/bdr.h
+++ b/bdr.h
@@ -486,7 +486,7 @@ extern void bdr_sigterm(SIGNAL_ARGS);
 extern int find_perdb_worker_slot(Oid dboid,
                                     BdrWorker **worker_found);
 
-extern void bdr_launch_apply_workers(Oid dboid);
+extern void bdr_maintain_db_workers(void);
 
 extern Datum bdr_connections_changed(PG_FUNCTION_ARGS);
 
index 486546526684c6975230b69a989f0831d0c34545..8e887cfdc325d32ffb74c0b738f78d18c7b83159 100644 (file)
@@ -1041,7 +1041,7 @@ bdr_init_replica(BDRNodeInfo *local_node)
         * from the target node and also makes sure we stay more up-to-date,
         * reducing slot lag on other nodes.
         */
-       bdr_launch_apply_workers(MyDatabaseId);
+       bdr_maintain_db_workers();
 
        /*
         * Insert our connection info on the remote end. This will prompt
index b1aa785d30c76e3458ea5129918fe0a1509f869e..84c7badd0f37039808dddf6c53c00344bda461c5 100644 (file)
@@ -220,7 +220,7 @@ getattno(const char *colname)
  * connection that doesn't already have one.
  */
 void
-bdr_launch_apply_workers(Oid dboid)
+bdr_maintain_db_workers(void)
 {
    BackgroundWorker    bgw;
    int                 i, ret;
@@ -368,7 +368,7 @@ bdr_launch_apply_workers(Oid dboid)
        {
            elog(DEBUG2, "Skipping registration of worker for node "BDR_LOCALID_FORMAT" on db oid=%u: already registered",
                 target_sysid, target_timeline, target_dboid,
-                EMPTY_REPLICATION_NAME, dboid);
+                EMPTY_REPLICATION_NAME, MyDatabaseId);
            LWLockRelease(BdrWorkerCtl->lock);
            continue;
        }
@@ -559,7 +559,7 @@ bdr_perdb_worker_main(Datum main_arg)
         BDR_LOCALID_FORMAT_ARGS, NameStr(perdb->dbname));
 
    /* Launch the apply workers */
-   bdr_launch_apply_workers(MyDatabaseId);
+   bdr_maintain_db_workers();
 
 #ifdef BUILDING_BDR
    elog(DEBUG1, "BDR starting sequencer on db \"%s\"",
@@ -625,7 +625,7 @@ bdr_perdb_worker_main(Datum main_arg)
                 * If the perdb worker's latch is set we're being asked
                 * to rescan and launch new apply workers.
                 */
-               bdr_launch_apply_workers(MyDatabaseId);
+               bdr_maintain_db_workers();
            }
        }
    }