diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,6 @@
 Changelog for tmp-postgres
+- 1.34.1.0
+  - #229 Add a `auto_explain` config
 
 - 1.34.0.1
   - #244 Fix cacheDbConfig doc
diff --git a/src/Database/Postgres/Temp.hs b/src/Database/Postgres/Temp.hs
--- a/src/Database/Postgres/Temp.hs
+++ b/src/Database/Postgres/Temp.hs
@@ -56,6 +56,7 @@
   , defaultConfig
   , defaultConfig_9_3_10
   , verboseConfig
+  , autoExplainConfig
   -- *** Custom Config builder helpers
   , optionsToDefaultConfig
   -- ** Main resource handle
diff --git a/src/Database/Postgres/Temp/Internal.hs b/src/Database/Postgres/Temp/Internal.hs
--- a/src/Database/Postgres/Temp/Internal.hs
+++ b/src/Database/Postgres/Temp/Internal.hs
@@ -262,6 +262,43 @@
   , postgresConfig = standardProcessConfig
   }
 
+{-|
+Useful options for configuring and loading @auto_explain@.
+
+@since 1.34.1.0
+-}
+autoExplainPostgresConfig :: Int -> [(String, String)]
+autoExplainPostgresConfig milliseconds = verbosePostgresConfig <>
+  [ ("log_min_duration_statement", show milliseconds <> "ms")
+  , ("shared_preload_libraries", "'auto_explain'")
+  , ("session_preload_libraries", "'auto_explain'")
+  , ("auto_explain.log_analyze", "1")
+  , ("auto_explain.log_buffers", "1")
+  , ("auto_explain.log_timing", "1")
+  , ("auto_explain.log_triggers", "1")
+  , ("auto_explain.log_verbose", "1")
+  , ("auto_explain.log_min_duration", show milliseconds <> "ms")
+  , ("auto_explain.log_nested_statements", "1")
+  , ("auto_explain.sample_rate", "1")
+  , ("auto_explain.log_verbose", "on")
+  , ("log_connections", "off")
+  , ("log_disconnections", "off")
+  ]
+
+{-|
+A config which loads and configures @auto_explain@. Useful for
+understanding slow queries plans.
+
+@since 1.34.1.0
+-}
+autoExplainConfig
+  :: Int
+  -- ^ Minimum number of milliseconds to log. Use 0 to log all queries.
+  -> Config
+autoExplainConfig milliseconds = defaultConfig <> mempty
+  { postgresConfigFile = autoExplainPostgresConfig milliseconds
+  , postgresConfig = standardProcessConfig
+  }
 
 {-|
 
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -381,7 +381,7 @@
 
   it "withDbCache seems to work" $
     withDbCache $ \cacheInfo ->
-      either throwIO pure <=< withConfig (cacheConfig cacheInfo <> verboseConfig) $ \db -> do
+      either throwIO pure <=< withConfig (cacheConfig cacheInfo <> autoExplainConfig 0) $ \db -> do
         assertConnection db
         withConn db $ \conn -> countDbs conn `shouldReturn` 3
 
@@ -628,7 +628,6 @@
     let action db = withConn db $ \conn -> do
           _ <- PG.execute_ conn "BEGIN; CREATE TABLE foo ( id int );"
           void $ PG.execute_ conn "INSERT INTO foo (id) VALUES (1); END;"
-          putStrLn "hey"
     withTempDirectory "/tmp" "tmp-postgres-cache-action" $ \cachePath -> do
       let theFinalCachePath = cachePath <> "/cached"
       cacheAction theFinalCachePath action (defaultConfig { dataDirectory = Permanent theFinalCachePath } ) >>= \case
diff --git a/tmp-postgres.cabal b/tmp-postgres.cabal
--- a/tmp-postgres.cabal
+++ b/tmp-postgres.cabal
@@ -1,5 +1,5 @@
 name:                tmp-postgres
-version:             1.34.0.1
+version:             1.34.1.0
 synopsis: Start and stop a temporary postgres
 description: Start and stop a temporary postgres. See README.md
 homepage:            https://github.com/jfischoff/tmp-postgres#readme
