aidboxdb:13.2 or later.
PGAGENT_ENABLED
variable. If the variable is specified then the daemon will be started on container startup.PG_ROLE
is not equal to 'replica'
) because it may lead to unexpected behavior.POSTGRES_DB
environmental variable and will run as a user which is specified in POSTGRES_USER
variable (postgres
by default).PGAGENT_USER
and PGAGENT_PASSWORD
variables.PGAGENT_DB
variable. But you have to create the database and extension manually before starting PgAgent.CREATE EXTENSION pgagent;
PGAGENT_LOG_LEVEL
and you can specify a file where PgAagent logs are written in PGAGENT_LOG_FILE_PATH
.pgagent
job with dedicated pgagent database and user.docker-compose
configuration:docker-compose.yaml
file:pgrep command
:ps aux
command if you want to see more details on pgagent
arguments:pgagent
logs:WARNING: Couldn't create the primary connection [Attempt #2]
– postgres takes some time to start and pgagent will reconnect as soon as postgres is ready to accept connections.pgagent.pga_job
table.test
table:pgagent
is a tool to run various jobs on your postgres database.pgagent
runs only if PGAGENT_ENABLED
variable is present.