Samples
To retrieve information about recent jobs:Available columns
| Name | Type | Description |
|---|---|---|
id | INTEGER | The sequencial ID to identify the job execution |
job_id | INTEGER | The ID of the background job created to implement the policy |
succeeded | BOOLEAN | TRUE when the job ran successfully, FALSE for failed executions |
proc_schema | TEXT | The schema name of the function or procedure executed by the job |
proc_name | TEXT | The name of the function or procedure executed by the job |
pid | INTEGER | The process ID of the background worker executing the job. This is NULL in the case of a job crash |
start_time | TIMESTAMP WITH TIME ZONE | The time the job started |
finish_time | TIMESTAMP WITH TIME ZONE | The time when the error was reported |
config | JSONB | The job configuration at the moment of execution |
sqlerrcode | TEXT | The error code associated with this error, if any. See the official Postgres documentation for a full list of error codes |
err_message | TEXT | The detailed error message |
Error retention policy
Thetimescaledb_information.job_history informational view is defined on top
of the _timescaledb_internal.bgw_job_stat_history table in the internal schema. To
prevent this table from growing too large, the
Job History Log Retention Policy [3] system background job is enabled by default,
with this configuration:
tsdbadmin. In an on-premise installation, the owner of the
job is the same as the extension owner.
The owner of the retention job can alter it and delete it.
For example, the owner can change the retention interval like this: