getDefaultDatabaseName returns the name of the default database to create on first server start. If the environment variable DOLTGRES_DB is set, that value is used. Otherwise, the username is used. The username is in turn configured with the environment variable DOLTGRES_USER, defaulting to "postgre
(userName string)
| 219 | // If the environment variable DOLTGRES_DB is set, that value is used. Otherwise, the username is used. |
| 220 | // The username is in turn configured with the environment variable DOLTGRES_USER, defaulting to "postgres". |
| 221 | func getDefaultDatabaseName(userName string) string { |
| 222 | defaultDbName := os.Getenv(DefaultDbNameEnvVar) |
| 223 | if defaultDbName != "" { |
| 224 | return defaultDbName |
| 225 | } |
| 226 | return userName |
| 227 | } |
| 228 | |
| 229 | // startReplication begins the background thread that replicates from Postgres, if one is configured. |
| 230 | func startReplication(cfg *servercfg.DoltgresConfig, ssCfg doltservercfg.ServerConfig) (*logrepl.LogicalReplicator, error) { |
no outgoing calls
no test coverage detected