          (ex-info "Currently unable to migrate multiple databases (see config)"
                   {:kind ::must-migrate-multiple-databases}))))
 
-    (init-with-db database config)
+    (conf/reduce-section
+     (fn [_ name settings]
+       (init-with-db name settings))
+     nil
+     database)
 
     (if upgrade-and-exit?
       context

(defn init-with-db
  "Performs all initialization operations requiring a database
  connection using a transient connection pool derived from the
  `write-db-config`.  Blocks until the initialization is complete, and
  then returns an unspecified value.  Throws exceptions on errors.
  Throws {:kind ::unsupported-database :current version :oldest
  version} if the current database is not supported. Throws
  {:kind ::invalid-database-configuration :failed-validation failed-map}
  if the database contains a disallowed setting."
  [write-db-config config]
  ;; A C-c (SIGINT) will close the pool via the shutdown hook, which
  ;; will then cause the pool connection to throw a (generic)
  ;; SQLException.
  (let  [migrator (:migrator-username write-db-config)]
    (with-open [db-pool (-> (assoc write-db-config
                                   :pool-name "PDBMigrationsPool"
                                   :connection-timeout 3000
                                   :rewrite-batched-inserts "true"
                                   :user migrator
                                   :password (:migrator-password write-db-config))
                            (jdbc/make-connection-pool database-metrics-registry))]
      (let [runtime (Runtime/getRuntime)
            on-shutdown (doto (Thread.

  (doseq [[{:keys [schema-check-interval] :as cfg} db] (map vector db-configs db-pools)
          :when (pos? schema-check-interval)]
    (interspaced schema-check-interval
                 #(check-schema-version (desired-schema-version)
                                        (:stop-status context)
                                        db service request-shutdown)
                 job-pool)))

(defn start-garbage-collection
