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);
* 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
* connection that doesn't already have one.
*/
void
-bdr_launch_apply_workers(Oid dboid)
+bdr_maintain_db_workers(void)
{
BackgroundWorker bgw;
int i, ret;
{
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;
}
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\"",
* 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();
}
}
}