diff --git a/src/metabase/driver/generic_sql/util.clj b/src/metabase/driver/generic_sql/util.clj
index 4b4d1cac601ef8a50ce49414e65d7206f2a15501..c749b07a43577157fd7d6a0abffe992690dba234 100644
--- a/src/metabase/driver/generic_sql/util.clj
+++ b/src/metabase/driver/generic_sql/util.clj
@@ -10,19 +10,23 @@
             [metabase.driver.query-processor :as qp]))
 
 ;; Cache the Korma DB connections for a given Database for 60 seconds instead of creating new ones every single time
-(defn- db->connection-spec [database]
+(defn- db->connection-spec [{{:keys [short-lived?]} :details, :as database}]
   (let [driver                              (driver/engine->driver (:engine database))
         database->connection-details        (:database->connection-details driver)
         connection-details->connection-spec (:connection-details->connection-spec driver)]
-    (-> database database->connection-details connection-details->connection-spec)))
+    (merge (-> database database->connection-details connection-details->connection-spec)
+           ;; unless this is a temp DB, we need to make a pool or the connection will be closed before we get a chance to unCLOB-er the results during JSON serialization
+           ;; TODO - what will we do once we have CLOBS in temp DBs?
+           (when-not short-lived?
+             {:make-pool? true}))))
 
-(def ^{:arglists '([database])} db->korma-db
+(def ^{:arglists '([database])}
+  db->korma-db
   "Return a Korma database definition for DATABASE.
    This does a little bit of smart caching (for 60 seconds) to avoid creating new connections when unneeded."
   (let [-db->korma-db (memo/ttl (fn [database]
                                   (log/debug (color/red "Creating a new DB connection..."))
-                                  (assoc (kdb/create-db (db->connection-spec database))
-                                         :make-pool? true))
+                                  (kdb/create-db (db->connection-spec database)))
                                 :ttl/threshold (* 60 1000))]
     ;; only :engine and :details are needed for driver/connection so just pass those so memoization works as expected
     (fn [database]
@@ -67,6 +71,7 @@
     (-> (sel :one Table :id 100)
         korma-entity
         (select (aggregate (count :*) :count)))"
+  {:arglists '([table] [db table])}
   ([{db-delay :db, :as table}]
    {:pre [(delay? db-delay)]}
    (korma-entity @db-delay table))
diff --git a/test/metabase/test/data/h2.clj b/test/metabase/test/data/h2.clj
index 3a6e869dc4364310e930ca5fc3f5a24b7399712b..928207f7242c96002f5015b324d97ef5775cc6f9 100644
--- a/test/metabase/test/data/h2.clj
+++ b/test/metabase/test/data/h2.clj
@@ -33,10 +33,11 @@
 
 (defn- connection-details
   "Return a Metabase `Database.details` for H2 database defined by DATABASE-DEFINITION."
-  [^DatabaseDefinition database-definition]
-  {:db (format (if (:short-lived? database-definition) "file:%s" ; for short-lived connections don't create a server thread and don't use a keep-alive connection
+  [^DatabaseDefinition {:keys [short-lived?], :as database-definition}]
+  {:db (format (if short-lived? "file:%s" ; for short-lived connections don't create a server thread and don't use a keep-alive connection
                    "file:%s;AUTO_SERVER=TRUE;DB_CLOSE_DELAY=-1")
-               (filename database-definition))})
+               (filename database-definition))
+   :short-lived? short-lived?})
 
 (defn- korma-connection-pool
   "Return an H2 korma connection pool to H2 database defined by DATABASE-DEFINITION."
diff --git a/test/metabase/test/data/postgres.clj b/test/metabase/test/data/postgres.clj
index a77e13c5b17ba4a64427c9b96c118cdbb25941ff..8372b13fcb9c9315272e14c1a6cd2920c805b1c6 100644
--- a/test/metabase/test/data/postgres.clj
+++ b/test/metabase/test/data/postgres.clj
@@ -23,9 +23,10 @@
    :TextField       "TEXT"
    :TimeField       "TIME"})
 
-(defn- pg-connection-details [^DatabaseDefinition database-definition]
-  (merge {:host "localhost"
-          :port 5432}
+(defn- pg-connection-details [^DatabaseDefinition {:keys [short-lived?]}]
+  (merge {:host         "localhost"
+          :port         5432
+          :short-lived? short-lived?}
          ;; HACK
          (when (env :circleci)
            {:user "ubuntu"})))