Updated on 2024-12-19 GMT+08:00

PG_JOB_SINGLE

PG_JOB_SINGLE displays job information about the current node.

Table 1 PG_JOB_SINGLE columns

Name

Type

Description

job_id

bigint

Job ID

current_postgres_pid

bigint

If the current job has been executed, the PostgreSQL thread ID of this job is recorded. The default value is -1, indicating that the task is not executed or has been executed.

log_user

name

User name of the job creator

priv_user

name

User name of the job executor

dbname

name

Name of the database where the job is executed

node_name

name

CN node on which the job will be created and executed

job_status

text

Status of the current job. The value range is r, s, f, or d. The default value is s. The indications are as follows:

  • r=running
  • s=successfully finished
  • f=job failed
  • d=disable
NOTE:
  • Note: When you disable a scheduled task (by setting job_queue_processes to 0), the thread monitor the job execution is not started, and the job_status will not be updated. You can ignore the job_status.
  • Only when the scheduled task function is enabled (that is, when job_queue_processes is not 0), the system updates the value of job_status based on the real-time job status.

start_date

timestamp without time zone

Start time of the first job execution, precise to millisecond

next_run_date

timestamp without time zone

Scheduled time of the next job execution, accurate to millisecond

failure_count

smallint

Number of consecutive failures.

interval

text

Job execution interval

last_start_date

timestamp without time zone

Start time of the last job execution, accurate to millisecond

last_end_date

timestamp without time zone

End time of the last job execution, accurate to millisecond

last_suc_date

timestamp without time zone

Start time of the last successful job execution, accurate to millisecond

this_run_date

timestamp without time zone

Start time of the ongoing job execution, accurate to millisecond

nspname

name

Name of the namespace where a job is running

what

text

Job content