!=e-      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     None"#%*0479;<MPSX_L( tmp-postgres] is the low level configuration necessary for initializing a database cluster starting postgres@ and creating a database. There is no validation done on the H. It is recommend that one use the higher level functions such as . which will generate plans that are valid. ^s are used internally but are exposed if the higher level plan generation is not sufficent. tmp-postgresThe output of calling ?. tmp-postgresConnection options tmp-postgrespostgres process handle tmp-postgres is used be ? to start the postgres# and then attempt to connect to it. tmp-postgresThe process config for postgres tmp-postgres(Connection options. Used to verify that postgres is ready. tmp-postgresc contains the configuration necessary for starting a process. It is essentially a stripped down . tmp-postgresEnvironment variables tmp-postgresCommand line arguements tmp-postgresThe  for standard input tmp-postgresThe  for standard output tmp-postgresThe  for standard error  tmp-postgresA way to log internal .s  tmp-postgresA 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.  tmp-postgrespostgresZ failed before a connection succeeded. Most likely this is due to invalid configuration! tmp-postgresinitdbV failed. This can be from invalid configuration or using a non-empty data directory" tmp-postgrescreatedbW failed. This can be from invalid configuration or the database might already exist.# tmp-postgresThe ! was missing info and a complete  could not be created.$ tmp-postgresThe  was missing info and a  could not be created.% tmp-postgresTimed out waiting for postgres to accept a connection' tmp-postgresThis will happen if a  is missing a  .( tmp-postgres/This is called if copying a folder cache fails.) tmp-postgres?Failed to find a data directory when trying to get a cached initdb folder.* tmp-postgresDWe tried to copy a data directory to a snapshot folder and it failed.  tmp-postgresInternal events for debugging/ tmp-postgresKThe first event. This useful for debugging what is actual passed to the initdb, createdb and postgres.0 tmp-postgres1The second event. Postgres is about to get called1 tmp-postgresnThe third event. Postgres started. We are now about to setup a reconnect loop (racing with a process checker)2 tmp-postgresmThe fourth event and (possibly all subsequent events). We are looping trying to successfully connect to the postgres process.4 tmp-postgrespostgres< is not ready until we are able to successfully connect. 4^ attempts to connect over and over again and returns after the first successful connection.8 tmp-postgres-Start a process interactively and return the 9 tmp-postgresStop a . An alias for : tmp-postgres7Start a process and block until it finishes return the .; tmp-postgres7Start a process and block until it finishes return the  and the stderr output.> tmp-postgres Stop the postgres> process after attempting to terminate all the connections.? tmp-postgres Start the postgresq process and block until a successful connection occurs. A separate thread we continously check to see if the postgres process has crashed.B tmp-postgresCall createdbE and tee the output to return if there is an an exception. Throws ".C tmp-postgresC optionally calls initdb, optionally calls createdb and unconditionally calls postgresQ. Additionally it writes a "postgresql.conf" and does not return until the postgres process is ready. See ? for more details.D tmp-postgres Stop the postgres process. See > for more details.8 tmp-postgres Process name tmp-postgresProcess config: tmp-postgres Process name tmp-postgresProcess config; tmp-postgres Process name tmp-postgresProcess configE   *)('&%$#"! -,+.210/3456789:;<=>?@ABCDE.210/*)('&%$#"! -,+3456789:;<=>?@  AB CDNone"#%*0479;<MPSX_S5S  tmp-postgresS[ holds a description of the temporary folders (if there are any) and includes the final  that can be used with C . See # for an example of how to create a S.U tmp-postgresFinal . See C for information on s.V tmp-postgresDThe used to potentially cleanup the temporary unix socket directory.W tmp-postgresDThe data directory. Used to track if a temporary directory was used.X tmp-postgresNThe directory where other temporary directories are created. Usually @/tmp.Z tmp-postgres1Copy command used to create a data directory. If initdb? used to create the data directory directly this is not needed.If ] is Nothing then the j$ (which might be generated) is used._ tmp-postgres7The high level options for overriding default behavior.a tmp-postgres Internal . logger.b tmp-postgresMonoid for accumulating initdb configuration.c tmp-postgres(An optional data directory copy command.d tmp-postgresMonoid for accumulating createdb configuration.e tmp-postgresThe postgres process configuration.f tmp-postgres)The additional client connection options.g tmp-postgresThe postgresql.conf configuration file.h tmp-postgres7The amount of microseconds to attempt to connect to postgres before throwing %i tmp-postgresEOverride the default temporary UNIX socket directory by setting this.j tmp-postgres=Override the default temporary data directory by passing in o  DIRECTORY.k tmp-postgres)A monoid for using an existing port (via   PORT_NUMBER$) or requesting a free port (via a ).l tmp-postgresIThe directory used to create other temporary directories. Defaults to /tmp.n  tmp-postgresUsed to specify a p1 folder that is automatically cleaned up or a o1 folder which is not automatically cleaned up.o tmp-postgres.A permanent file that should not be generated.p tmp-postgres)A temporary file that needs to generated.q  tmp-postgresGA type to track whether a file is temporary and needs to be cleaned up.t  tmp-postgresProcess configurationv tmp-postgresRA monoid for combine environment variables or replacing them. for the maps the & monoid is used. So the last key wins.w tmp-postgres9A monoid for combine command line Args or replacing them.x tmp-postgres,A monoid for configuring the standard input .y tmp-postgres-A monoid for configuring the standard output .z tmp-postgres,A monoid for configuring the standard error .{  tmp-postgres)A type to help combine command line Args.} tmp-postgresArgs of the form -h foo,  --host=foo and --switch. The key is  |ed with value so the key should include the space or equals (as shown in the first two examples respectively). The % monoid is used so the last key wins.~ tmp-postgres=Args that appear at the end of the key based Args. The % monoid is used so the last key wins.  tmp-postgresvThe environment variables can be declared to inherit from the running process or they can be specifically added. tmp-postgres is a monoid.It's !' behavior is analogous to 1 and 0 with " . Think of  as 1 and  as 0.The behavior of  is like s.  tmp-postgres4Combine the current environment (if indicated by  ) with .  tmp-postgresThis convert the { to '[String]'.  tmp-postgresThe  sets the handles to #, $ and %D and inherits the environment variables from the calling process.  tmp-postgresA global reference to  /dev/null .  tmp-postgres sets the handles to  /dev/nullD and inherits the environment variables from the calling process.  tmp-postgresTurn a t into a t%. Fails if any values are missing.  tmp-postgresGet the file path of a q, regardless if it is a r or s type.  tmp-postgresEither create as directory or do nothing to a r one. tmp-postgresEither remove a s directory or do nothing to a r one. tmp-postgresTurn a _ into a %. Fails if any values are missing. tmp-postgresTurn a _ into a ". Fails if any values are missing. tmp-postgres Create a _9 that sets the command line options of all processes (initdb, postgres and createdb ). This the  generated# plan that is combined with the extra plan from  . tmp-postgres*Create all the temporary resources from a _. This also combines the _ from  with the extra _ passed in. tmp-postgres(Free the temporary resources created by .  tmp-postgres Display a _.  tmp-postgres Make the W r" so it will not get cleaned up. tmp-postgres"Attempt to create a config from a &. This is useful if want to create a database owned by a specific user you will also log in as among other use cases. It is possible some &S are not supported so don't hesitate to open an issue on github if you find one. tmp-postgresp as ' tmp-postgresTakes the last o value. tmp-postgres!Temporary directory configuration tmp-postgresDirectory pattern tmp-postgresMake initdb options. tmp-postgresMake createdb options. tmp-postgres The port. tmp-postgresSocket directory. tmp-postgresThe postgres data directory. tmp-postgresextra _ to   after the  generated _._STUWVYXZ[^]\_`mljicghdefbaknpoqsrtuxwvzy{|~}_{|~}tuxwvzyqsrnpo_`mljicghdefbakZ[^]\STUWVYXNone"#%*0479;<MPSX_'w, tmp-postgres7A type to track a possibly temporary snapshot directory tmp-postgres8A handle to cache temporary resources and configuration. tmp-postgresConfiguration for the initdb data directory cache. tmp-postgres!Root temporary directory used if  is set to p. /tmp is a good default. tmp-postgresUsed to specify is a o or p directory should be used.   uses o ~/.tmp-postgres by default. tmp-postgres3Some operatoring system versions support flags for cp9 that allow "copy on write" which is about 2x faster.  ! attempts to determine if the cp8 on the path supports copy on write and sets this to ( if it does.  tmp-postgres,Handle for holding temporary resources, the postgres< process handle and postgres connection information. The / also includes the final plan used to start initdb, createdb and postgres. See  or  for converting a ! to postgresql connection string. tmp-postgres"Temporary resources and the final . tmp-postgrespostgres+ process handle and the connection options.  tmp-postgres Convert a = to a connection string. Alternatively one can access the & using .  tmp-postgres Convert a  to a connection & type.  tmp-postgresbAccess the data directory. This was either generated or specified explicitly when creating the _ tmp-postgresJMake the data directory permanent. Useful for debugging. If you are using  or # this function will not modify the I that is passed for cleanup. You will need to setup your own bracket like  bracket (fmap  ) (either mempty )   tmp-postgresDGet the directory that is used to create other temporary directories tmp-postgresGet the final postgresql.conf tmp-postgresThe fastest config we can make.  shared_buffers = 12MB fsync = off synchronous_commit = off full_page_writes = off log_min_messages = PANIC log_min_error_statement = PANIC log_statement = none client_min_messages = ERROR  tmp-postgresPThe default configuration. This will create a database called "postgres" via initdb (it's default behavior). It will create a temporary directory for the data and a temporary directory for a unix socket on a random port. Additionally it will use the following "postgresql.conf" which is optimized for performance.  shared_buffers = 12MB fsync = off synchronous_commit = off full_page_writes = off log_min_messages = PANIC log_min_error_statement = PANIC log_statement = none client_min_messages = ERROR  also passes the  --no-sync flag to initdb.DIf you would like to customize this behavior you can start with the # and overwrite fields or combine a  with another _ using ! ( ).Alternatively you can eschew  altogether, however your postgres' might start and run faster if you use .The  redirects all output to  /dev/null. See % for a version that logs more output.ETo append additional lines to "postgresql.conf" file create a custom _ like the following. ' custom = defaultConfig <> mempty { g = [ ("wal_level, "replica") , ("archive_mode", on") , ("max_wal_senders", "2") , ("fsync", "on") , ("synchronous_commit", "on") ] } This is common enough there is  which is a helper to do this.As an alternative to using > one could create a config from connections parameters using . tmp-postgresODefault configuration for PostgreSQL versions 9.3 and greater but less than 10.]If you get an error that "--no-sync" is an invalid parameter then you should use this config. tmp-postgres  the  with a _D that provides additional "postgresql.conf" lines. Equivalent to:  extra =  <> mempty { g = extra }  tmp-postgresDefault postgres options tmp-postgresThe similar to  log as much as possible. tmp-postgres?Create zero or more temporary resources and use them to make a _.aThe passed in config is inspected and a generated config is created. The final config is built by  generated ! extra Based on the value of i% a "postgresql.conf" is created with: U listen_addresses = '127.0.0.1, ::1' unix_socket_directories = 'SOCKET_DIRECTORY' Additionally the  generated _ also does the following:Sets a h of one minute.Logs internal .s.@Sets the processes to use the standard input and output handles. Sets the j to file path generated from j.,All of these values can be overrided by the extra config. The returned  requires cleanup.  should be used with a ) and , e.g.   :: _ -> ( -> IO a) -> IO (Either  a)  plan f = ) ( plan) (either mempty /) $ either (pure . Left) (fmap Right . f)  or just use . If you are calling  you probably want  anyway. tmp-postgres.Default start behavior. Equivalent to calling  with the .  tmp-postgres Stop the postgresM process and cleanup any temporary resources that might have been created.  tmp-postgresOnly stop the postgresu process but leave any temporary resources. Useful for testing backup strategies when used in conjunction with  or . tmp-postgresOnly stop the postgres> process but leave any temporary resources. In contrast to  this function makes sure postgres; has time to properly write files to the data directory.  tmp-postgres Restart the postgres from  using the prior _.  tmp-postgres>Reload the configuration file without shutting down. Calls pg_reload_conf(). tmp-postgres1Exception safe database create with options. See  for more details. Calls  even in the face of exceptions. tmp-postgres1Default expectation safe interface. Equivalent to   =     tmp-postgresException safe version of . tmp-postgresAttempt to create a _ from a &x. Useful if you want to create a database owned by a specific user you will also login with among other use cases.  tmp-postgres Display a . tmp-postgresA bool that is ( if the cp/ on the path supports "copy on write" flags.  tmp-postgres  attempts to determine if the cpA on the path supports "copy on write" flags and if it does, sets  to (.It sets  to o ~/.tmp-postgres and  to /tmp (but this is not used when o is set).  tmp-postgres Setup the initdb cache folder.  tmp-postgres&Cleanup the cache directory if it was p.  tmp-postgresEnable initdb7 data directory caching. This can lead to a 4x speedup.Exception safe version of  . Equivalent to    = bracket (  config)     tmp-postgresEquivalent to   with the    makes.!Here is an example using caching: v withDbCache $ \cache -> do withCache (cacheConfig cache) $ \db -> ... withCache (cacheConfig cache) $ \db -> ...  tmp-postgresHelper to make a _ out of caching info. tmp-postgres9Shutdown the database and copy the directory to a folder. tmp-postgres6Cleanup any temporary resources used for the snapshot. tmp-postgresRException safe method for taking a file system level copy of the database cluster.Snapshots are useful if you would like to start every test from a migrated database and the migration process is more time consuming then copying the additional data..Here is an example with caching and snapshots: $ withDbCache $ \cache -> withConfig (cacheConfig cache) $ \db -> migrate db withSnapshot Temporary db $ \snapshot -> do withConfig (snapshotConfig db) $ \migratedDb -> ... withConfig (snapshotConfig db) $ \migratedDb -> ... withConfig (snapshotConfig db) $ \migratedDb -> ...  tmp-postgresConvert a snapshot into a _ that includes a c= for copying the snapshot directory to a temporary directory. tmp-postgresextra configuration that is  ed last to the generated _.  generated ! extra. tmp-postgresextra. _ combined with the generated _. See  for more info. tmp-postgresaction continuation. tmp-postgresaction continuation.  tmp-postgres Configuration tmp-postgres#action for which caching is enabled tmp-postgres Either a p or preexisting o directory. tmp-postgresThe handle. The postgres. is shutdown and the data directory is copied.3     3     None"#%*0479;<MPSX_)e !"#$%&'()*+,-./012_`kabfedhgcijlmnopqrstuyzvwx{|}~     e      !"#$%&'()*+,-_`kabfedhgcijlmtuyzvwx{|}~nopqrs./012*    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXXYZ[\]^^_`abbc defghijklmnopqrstuvwxyzz{|}}~       !"#$%$&$'()*+,-./01,tmp-postgres-1.26.0.0-HCcvX9m2QsuARYhwif5qiG$Database.Postgres.Temp.Internal.Core&Database.Postgres.Temp.Internal.ConfigDatabase.Postgres.Temp.InternalDatabase.Postgres.TempstartDatabase.Postgres.Temp.ConfigPlan ProcessConfig initDbConfig startConfigcompletePlanLoggercompletePlanInitDbcompletePlanCopycompletePlanCreateDbcompletePlanPostgrescompletePlanConfigcompletePlanDataDirectorycompletePlanConnectionTimeoutCompleteCopyDirectoryCommandcopyDirectoryCommandSrccopyDirectoryCommandDstcopyDirectoryCommandCowPostgresProcesspostgresProcessClientOptionspostgresProcessHandleCompletePostgresPlan!completePostgresPlanProcessConfig!completePostgresPlanClientOptionsCompleteProcessConfigcompleteProcessConfigEnvVarscompleteProcessConfigCmdLinecompleteProcessConfigStdIncompleteProcessConfigStdOutcompleteProcessConfigStdErrLogger StartErrorStartPostgresFailed InitDbFailedCreateDbFailed PlanFailedCompleteProcessConfigFailedConnectionTimedOut DeleteDbErrorEmptyDataDirectoryCopyCachedInitDbFailedFailedToFindDataDirectorySnapshotCopyFailedstartErrorStdOutstartErrorStdErrstartErrorExitCodeEvent StartPlan StartPostgres WaitForDB TryToConnectthrowIfNotSuccess waitForDB teeHandle prettyHandle prettyKeyPair startProcess stopProcessexecuteProcessexecuteProcessAndTee prettyOptionsterminateConnectionsstopPostgresProcessstartPostgresProcess executeInitDbexecuteCopyDirectoryCommandexecuteCreateDb startPlanstopPlan $fShowEvent$fExceptionStartError$fPrettyCompleteProcessConfig$fPrettyCompletePostgresPlan$fPrettyPostgresProcess$$fPrettyCompleteCopyDirectoryCommand $fPrettyPlan $fEqEvent $fOrdEvent$fShowStartError$fEqStartError"$fShowCompleteCopyDirectoryCommand $fEqCompleteCopyDirectoryCommand!$fOrdCompleteCopyDirectoryCommand Resources resourcesPlanresourcesSocketDirectoryresourcesDataDirresourcesTemporaryDirresourcesInitDbCacheCopyDirectoryCommandsourceDirectorydestinationDirectoryuseCopyOnWriteConfiglogger copyConfigcreateDbConfigpostgresConfigconnectionOptionspostgresConfigFileconnectionTimeoutsocketDirectory dataDirectoryporttemporaryDirectory initDbCache DirectoryType Permanent TemporaryCompleteDirectoryType CPermanent CTemporaryenvironmentVariables commandLinestdInstdOutstdErrCommandLineArgskeyBased indexBasedEnvironmentVariablesinheritspecificAccumDontCareZlichMergegetAccum prettyMapcompleteEnvironmentVariablestakeWhileInSequencecompleteCommandLineArgsstandardProcessConfigdevNullsilentProcessConfigaddErrorContext getOptioncompleteProcessConfig toFilePath makePermanentsetupDirectoryTypermDirIgnoreErrorscleanupDirectoryTypecompletePostgresPlan flattenConfig completePlan hasInitDb hasCreateDbsocketDirectoryToConfigcompleteCopyDirectorygetInitDbVersionmakeCommandLinemakeInitDbCommandLinemakeArgumentHash makeCachePathsplitDataDirectoryaddDataDirectory cachePlantoPlan setupConfig cleanupConfigprettyPrintConfigmakeResourcesDataDirPermanentoptionsToConfig optionsToPlanclientOptionsToPlan userToPlan dbnameToPlanpasswordToPlanhostToSocketClass $fMonoidAccum$fSemigroupAccum$fApplicativeAccum$fPrettyEnvironmentVariables$fMonoidEnvironmentVariables$fSemigroupEnvironmentVariables$fPrettyCommandLineArgs$fSemigroupCommandLineArgs$fPrettyProcessConfig$fPrettyCompleteDirectoryType$fMonoidDirectoryType$fSemigroupDirectoryType$fPrettyDirectoryType$fPrettyCopyDirectoryCommand$fPrettyConfig$fPrettyResources $fShowAccum $fEqAccum $fOrdAccum$fFunctorAccum$fGenericEnvironmentVariables$fShowEnvironmentVariables$fEqEnvironmentVariables$fGenericCommandLineArgs$fShowCommandLineArgs$fEqCommandLineArgs$fMonoidCommandLineArgs$fGenericProcessConfig$fEqProcessConfig$fShowProcessConfig$fSemigroupProcessConfig$fMonoidProcessConfig$fShowCompleteDirectoryType$fEqCompleteDirectoryType$fOrdCompleteDirectoryType$fGenericCompleteDirectoryType$fNFDataCompleteDirectoryType$fShowDirectoryType$fEqDirectoryType$fOrdDirectoryType$fShowCopyDirectoryCommand$fEqCopyDirectoryCommand$fOrdCopyDirectoryCommand$fGenericConfig$fSemigroupConfig$fMonoidConfigSnapshot unSnapshotCachecacheResourcesCowcacheResourcesDirectory CacheConfigcacheTemporaryDirectorycacheDirectoryTypecacheUseCopyOnWriteDB dbResourcesdbPostgresProcesstoConnectionStringtoConnectionOptionstoDataDirectorymakeDataDirectoryPermanenttoTemporaryDirectorytoPostgresqlConfigFilefastPostgresConfig defaultConfigdefaultConfig_9_3_10defaultPostgresConfverbosePostgresConfig verboseConfigstop stopPostgresstopPostgresGracefullyrestart reloadConfig withConfigwith withRestartoptionsToDefaultConfig prettyPrintDBcowCheckdefaultCacheConfigsetupInitDbCachecleanupInitDbCachewithDbCacheConfig withDbCache cacheConfig takeSnapshotcleanupSnapshot withSnapshotsnapshotConfig $fPrettyDB$fGenericCache $fNFDataCache$fGenericSnapshot$fNFDataSnapshotprocess-1.6.3.0System.Process.Common CreateProcessbaseGHC.IO.Handle.TypesHandle ProcessHandleSystem.ProcesswaitForProcessGHC.IO.ExceptionExitCode GHC.MaybeJustNothingData.Semigroup.InternalDualGHC.Basemappend<>GHC.Num*GHC.IO.Handle.FDstdinstdoutstderr/postgres-options-0.2.0.0-FEfVRHnVs2pG3RBcj4OWRP"Database.PostgreSQL.Simple.OptionsOptionsmemptyghc-prim GHC.TypesTrueControl.Exception.Basebracket