HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduletmp-postgres-1.35.0.0Haskell2010

Database.Postgres.Temp.Internal.Core

This module provides the low level functionality for running initdb, postgres and createdb to make a database.

See startPlan for more details.

  • 9 types
  • 20 values
datadata Event
#

Internal events for debugging

Constructors

  • StartPlan String

    The first event. This useful for debugging what is actual passed to the initdb, createdb and postgres.

  • StartPostgres

    The second event. Postgres is about to get called

  • WaitForDB

    The third event. Postgres started. We are now about to setup a reconnect loop (racing with a process checker)

  • TryToConnect

    The fourth event and (possibly all subsequent events). We are looping trying to successfully connect to the postgres process.

Instances3Eq, Ord, Show
  • Eq EventDefined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Core
  • Ord EventDefined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Core
  • Show EventDefined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Core
datadata StartError
#

A list of failures that can occur when starting. This is not and exhaustive list but covers the errors that the system catches for the user.

Constructors

Instances3Eq, Show, Exception
  • Eq StartErrorDefined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Core
  • Show StartErrorDefined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Core
  • Exception StartErrorDefined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Core
valuewaitForDB :: Logger -> Options -> IO ()
#

postgres is not ready until we are able to successfully connect. waitForDB attempts to connect over and over again and returns after the first successful connection.

CompleteProcessConfig contains the configuration necessary for starting a process. It is essentially a stripped down CreateProcess.

Constructors

Instances1Pretty
Instances4Eq, Ord, Show, Pretty
datadata Plan
#

Plan is the low level configuration necessary for initializing a database cluster starting postgres and creating a database. There is no validation done on the Plan. It is recommend that one use the higher level functions such as Database.Postgres.Temp.start which will generate plans that are valid. Plans are used internally but are exposed if the higher level plan generation is not sufficent.

Instances1Pretty
  • Pretty PlanDefined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Core