forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
147 lines
14 KiB
HTML
147 lines
14 KiB
HTML
<a name="EN-US_TOPIC_0000001188163760"></a><a name="EN-US_TOPIC_0000001188163760"></a>
|
|
|
|
<h1 class="topictitle1">PG_JOB</h1>
|
|
<div id="body1599815907173"><p id="EN-US_TOPIC_0000001188163760__en-us_topic_0059777589_p57693551526"><strong id="EN-US_TOPIC_0000001188163760__b133121723185">PG_JOB</strong> displays detailed information about scheduled tasks created by users.</p>
|
|
<p id="EN-US_TOPIC_0000001188163760__p021219202209">The <strong id="EN-US_TOPIC_0000001188163760__b119471724155810">PG_JOB</strong> view replaces the <strong id="EN-US_TOPIC_0000001188163760__b183112475585">PG_JOB</strong> system catalog in earlier versions and provides forward compatibility with earlier versions. The original <strong id="EN-US_TOPIC_0000001188163760__b19491575912">PG_JOB</strong> system catalog is changed to the <strong id="EN-US_TOPIC_0000001188163760__b145411725135913">PG_JOBS</strong> system catalog. For details about <strong id="EN-US_TOPIC_0000001188163760__b13578038105910">PG_JOBS</strong>, see <a href="dws_04_0596.html">PG_JOBS</a>.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001188163760__tbd262debac2740f5af21067785f80b31" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_JOB columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001188163760__en-us_topic_0059778581_row5106215531"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.4.1.1"><p id="EN-US_TOPIC_0000001188163760__a98f0be1da5ea4e999b2ce71b34c06bb0">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.4.1.2"><p id="EN-US_TOPIC_0000001188163760__afd7ef571161748c59d7eaa52b2f8a787">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.3.2.4.1.3"><p id="EN-US_TOPIC_0000001188163760__en-us_topic_0059778581_p910651155317">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001188163760__rd5d4faad338b4e5ea8548209b5f6cdc0"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p10531181312206">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p752917135206">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p115271513202016">Job ID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row22841961011"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p72859931011">current_postgres_pid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p172858917107">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p8285595108">If the current job has been executed, the PostgreSQL thread ID of this job is recorded. The default value is <strong id="EN-US_TOPIC_0000001188163760__b2973210224">-1</strong>, indicating that the task is not executed or has been executed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row93015071417"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p12317503141">log_user</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p13145015140">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p13195011412">User name of the job creator</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row688175531413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p1788165551416">priv_user</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p788195517149">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p388185531410">User name of the job executor</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row124861258191415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p348675881418">dbname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p14486195861414">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p748635817141">Name of the database where the job is executed</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row8476151211512"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p547691210156">node_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p9476111215151">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p144761712191510">CN node on which the job will be created and executed</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row68621314171511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p18862131471512">job_status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p6862191416153">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p7986302199">Status of the current job. The value range is <strong id="EN-US_TOPIC_0000001188163760__b144632581413">r</strong>, <strong id="EN-US_TOPIC_0000001188163760__b2496601423">s</strong>, <strong id="EN-US_TOPIC_0000001188163760__b20487951721">f</strong>, or <strong id="EN-US_TOPIC_0000001188163760__b933616811214">d</strong>. The default value is <strong id="EN-US_TOPIC_0000001188163760__en-us_topic_0085032137_b842352706173734">s</strong>. The indications are as follows:</p>
|
|
<ul id="EN-US_TOPIC_0000001188163760__ul571114153198"><li id="EN-US_TOPIC_0000001188163760__li19711141551916">r=running</li><li id="EN-US_TOPIC_0000001188163760__li871212150199">s=successfully finished</li><li id="EN-US_TOPIC_0000001188163760__li17712715171918">f=job failed</li><li id="EN-US_TOPIC_0000001188163760__li2712191518195">d=disable</li></ul>
|
|
<div class="note" id="EN-US_TOPIC_0000001188163760__note81622539192"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="EN-US_TOPIC_0000001188163760__ul4961338132213"><li id="EN-US_TOPIC_0000001188163760__li174081043132214">Note: When you disable a scheduled task (by setting <strong id="EN-US_TOPIC_0000001188163760__b7541111318254">job_queue_processes</strong> to <strong id="EN-US_TOPIC_0000001188163760__b842352706105039">0</strong>), the thread monitor the job execution is not started, and the <strong id="EN-US_TOPIC_0000001188163760__b1664712294318">job_status</strong> will not be updated. You can ignore the <strong id="EN-US_TOPIC_0000001188163760__b759910511838">job_status</strong>.</li><li id="EN-US_TOPIC_0000001188163760__li79611038132215">Only when the scheduled task function is enabled (that is, when <strong id="EN-US_TOPIC_0000001188163760__b84235270611821">job_queue_processes</strong> is not <strong id="EN-US_TOPIC_0000001188163760__b84235270611825">0</strong>), the system updates the value of <strong id="EN-US_TOPIC_0000001188163760__b1687213551155">job_status</strong> based on the real-time job status.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row18395917191511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p7395517131513">start_date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p1244410341198">timestamp without time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p93958176154">Start time of the first job execution, precise to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row385172013159"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p18552017159">next_run_date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p128517201155">timestamp without time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p1685720181518">Scheduled time of the next job execution, accurate to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row67841922101517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p11785122211518">failure_count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p3785122241510">smallint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p1078522241515">Number of consecutive failures.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row1176016170244"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p67611817112414">interval</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p1761171772416">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p13761191711245">Job execution interval</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row720472162418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p15205172112413">last_start_date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p10205162118246">timestamp without time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p16205142110241">Start time of the last job execution, accurate to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row1988302372414"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p20883182312419">last_end_date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p38839236243">timestamp without time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p12883132313243">End time of the last job execution, accurate to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row1985182612242"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p158511263247">last_suc_date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p88513264247">timestamp without time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p1085182692417">Start time of the last successful job execution, accurate to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row926723342410"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p726810331249">this_run_date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p4268203302413">timestamp without time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p6268123318242">Start time of the ongoing job execution, accurate to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row1069419413361"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p206951347360">nspname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p1869520413619">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p136953483619">Name of the namespace where a job is running</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163760__row1648820913610"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188163760__p74889915361">what</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188163760__p44885917368">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188163760__p1248814916364">Job content</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0639.html">System Views</a></div>
|
|
</div>
|
|
</div>
|
|
|