yggdrasil_postgres v4.1.1 Yggdrasil.Settings.Postgres View Source
This module defines the available settings for PostgreSQL in Yggdrasil.
Link to this section Summary
Functions
Postgres database. Defaults to "postgres"
Postgres hostname. Defaults to "localhost"
Postgres max retries for the backoff algorithm. Defaults to 12
Postgres password. Defaults to "postgres"
Postgres port. Defaults to 5432
Postgres slot size for the backoff algorithm. Defaults to 100
Postgres username. Defaults to "postgres"
Link to this section Functions
Postgres database. Defaults to "postgres"
.
It looks for the value following this order:
- The OS environment variable
$YGGDRASIL_POSTGRES_DATABASE
. - The configuration file.
- The default value
"postgres"
.
If the database is defined using a namespace, then the name of the OS
variable should be $<NAMESPACE>_YGGDRASIL_POSTGRES_DATABASE
where
NAMESPACE
is the snake case version of the actual namespace e.g
MyApp.Namespace
would be MYAPP_NAMESPACE
.
config :yggdrasil, <NAMESPACE>
postgres: [database: "postgres"]
Postgres hostname. Defaults to "localhost"
.
It looks for the value following this order:
- The OS environment variable
$YGGDRASIL_POSTGRES_HOSTNAME
. - The configuration file.
- The default value
"localhost"
If the hostname is defined using a namespace, then the name of the OS
variable should be $<NAMESPACE>_YGGDRASIL_POSTGRES_HOSTNAME
where
NAMESPACE
is the snake case version of the actual namespace e.g
MyApp.Namespace
would be MYAPP_NAMESPACE
.
config :yggdrasil, <NAMESPACE>
potgres: [hostname: "localhost"]
Postgres max retries for the backoff algorithm. Defaults to 12
.
It looks for the value following this order.
- The OS environment variable
$YGGDRASIL_POSTGRES_MAX_RETRIES
. - The configuration file.
- The default value
12
.
If the max retries are defined using a namespace, then the name of the OS
variable should be $<NAMESPACE>_YGGDRASIL_POSTGRES_MAX_RETRIES
where
NAMESPACE
is the snake case version of the actual namespace e.g.
MyApp.Namespace
would be MYAPP_NAMESPACE
.
config :yggdrasil, <NAMESPACE>,
postgres: [max_retries: 12]
The backoff algorithm is exponential:
backoff_time = pow(2, retries) * random(1, slot) ms
when retries <= MAX_RETRIES
and slot
is given by the configuration
variable YGGDRASIL_POSTGRES_SLOT_SIZE
(defaults to 100
ms).
Postgres password. Defaults to "postgres"
.
It looks for the value following this order:
- The OS environment variable
$YGGDRASIL_POSTGRES_PASSWORD
. - The configuration file.
- The default value
"postgres"
.
If the password is defined using a namespace, then the name of the OS
variable should be $<NAMESPACE>_YGGDRASIL_POSTGRES_PASSWORD
where
NAMESPACE
is the snake case version of the actual namespace e.g
MyApp.Namespace
would be MYAPP_NAMESPACE
.
config :yggdrasil, <NAMESPACE>
postgres: [password: "postgres"]
Postgres port. Defaults to 5432
.
It looks for the value following this order:
- The OS environment variable
$YGGDRASIL_POSTGRES_PORT
. - The configuration file.
- The default value
5432
.
If the port is defined using a namespace, then the name of the OS variable
should be $<NAMESPACE>_YGGDRASIL_POSTGRES_PORT
where NAMESPACE
is the
snake case version of the actual namespace e.g MyApp.Namespace
would
be MYAPP_NAMESPACE
.
config :yggdrasil, <NAMESPACE>
postgres: [port: 5432]
Postgres slot size for the backoff algorithm. Defaults to 100
.
It looks for the value following this order.
- The OS environment variable
$YGGDRASIL_POSTGRES_SLOT_SIZE
. - The configuration file.
- The default value
100
.
If slot sizes is defined using a namespace, then the name of the OS
variable should be $<NAMESPACE>_YGGDRASIL_POSTGRES_SLOT_SIZE
where
NAMESPACE
is the snake case version of the actual namespace e.g.
MyApp.Namespace
would be MYAPP_NAMESPACE
.
config :yggdrasil, <NAMESPACE>,
postgres: [slot_size: 100]
Postgres username. Defaults to "postgres"
.
It looks for the value following this order:
- The OS environment variable
$YGGDRASIL_POSTGRES_USERNAME
. - The configuration file.
- The default value
"postgres"
.
If the username is defined using a namespace, then the name of the OS
variable should be $<NAMESPACE>_YGGDRASIL_POSTGRES_USERNAME
where
NAMESPACE
is the snake case version of the actual namespace e.g
MyApp.Namespace
would be MYAPP_NAMESPACE
.
config :yggdrasil, <NAMESPACE>
postgres: [username: "postgres"]