forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: luhuayi <luhuayi@huawei.com> Co-committed-by: luhuayi <luhuayi@huawei.com>
147 lines
14 KiB
HTML
147 lines
14 KiB
HTML
<a name="EN-US_TOPIC_0000001764491800"></a><a name="EN-US_TOPIC_0000001764491800"></a>
|
|
|
|
<h1 class="topictitle1">PG_JOB</h1>
|
|
<div id="body1599815907173"><p id="EN-US_TOPIC_0000001764491800__p1874884055719"><strong id="EN-US_TOPIC_0000001764491800__b139532022431751">PG_JOB</strong> displays detailed information about scheduled tasks created by users.</p>
|
|
<p id="EN-US_TOPIC_0000001764491800__p021219202209">The <strong id="EN-US_TOPIC_0000001764491800__b1829723313176">PG_JOB</strong> view replaces the <strong id="EN-US_TOPIC_0000001764491800__b1029843315176">PG_JOB</strong> system catalog in earlier versions and provides forward compatibility with earlier versions. The original <strong id="EN-US_TOPIC_0000001764491800__b19491575912">PG_JOB</strong> system catalog is changed to the <strong id="EN-US_TOPIC_0000001764491800__b145411725135913">PG_JOBS</strong> system catalog. For details about <strong id="EN-US_TOPIC_0000001764491800__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_0000001764491800__tbd262debac2740f5af21067785f80b31" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_JOB columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001764491800__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_0000001764491800__a98f0be1da5ea4e999b2ce71b34c06bb0"><strong id="EN-US_TOPIC_0000001764491800__b247335050103810">Column</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.4.1.2"><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__en-us_topic_0059778581_p910651155317">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001764491800__rd5d4faad338b4e5ea8548209b5f6cdc0"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__p752917135206">Bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__p115271513202016">Job ID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row22841961011"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__p172858917107">Bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__b38550541151">-1</strong>, indicating that the task is not executed or has been executed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row93015071417"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__p13145015140">Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__p13195011412">User name of the job creator</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row688175531413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__p788195517149">Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__p388185531410">User name of the job executor</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row124861258191415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__p348675881418">dbname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001764491800__p14486195861414">Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__p748635817141">Name of the database where the job is executed</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row8476151211512"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__p9476111215151">Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__p144761712191510">CN node on which the job will be created and executed</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row68621314171511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__p6862191416153">Text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__p7986302199">Status of the current job. The value range is <strong id="EN-US_TOPIC_0000001764491800__b1647610110618">r</strong>, <strong id="EN-US_TOPIC_0000001764491800__b7477311469">s</strong>, <strong id="EN-US_TOPIC_0000001764491800__b16477711264">f</strong>, <strong id="EN-US_TOPIC_0000001764491800__b14781315613">d</strong>, <strong id="EN-US_TOPIC_0000001764491800__b94791111365">p</strong>, <strong id="EN-US_TOPIC_0000001764491800__b74801311462">w</strong>, or <strong id="EN-US_TOPIC_0000001764491800__b7481411967">l</strong>. The default value is <strong id="EN-US_TOPIC_0000001764491800__b16481171961">s</strong>. The indications are as follows:</p>
|
|
<ul id="EN-US_TOPIC_0000001764491800__ul571114153198"><li id="EN-US_TOPIC_0000001764491800__li19711141551916">r=running</li><li id="EN-US_TOPIC_0000001764491800__li871212150199">s=successfully finished</li><li id="EN-US_TOPIC_0000001764491800__li17712715171918">f=job failed</li><li id="EN-US_TOPIC_0000001764491800__li2712191518195">d=disable</li><li id="EN-US_TOPIC_0000001764491800__li13861141215255">p=pending</li><li id="EN-US_TOPIC_0000001764491800__li7921154259">w=waiting</li><li id="EN-US_TOPIC_0000001764491800__li1341910552519">l=launching</li></ul>
|
|
<div class="note" id="EN-US_TOPIC_0000001764491800__note81622539192"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="EN-US_TOPIC_0000001764491800__ul4961338132213"><li id="EN-US_TOPIC_0000001764491800__li174081043132214">Note: When you disable a scheduled task (by setting <strong id="EN-US_TOPIC_0000001764491800__b7541111318254">job_queue_processes</strong> to <strong id="EN-US_TOPIC_0000001764491800__b842352706105039">0</strong>), the thread monitor the job execution is not started, and the <strong id="EN-US_TOPIC_0000001764491800__b1664712294318">job_status</strong> will not be updated. You can ignore the <strong id="EN-US_TOPIC_0000001764491800__b759910511838">job_status</strong>.</li><li id="EN-US_TOPIC_0000001764491800__li79611038132215">Only when the scheduled task function is enabled (that is, when <strong id="EN-US_TOPIC_0000001764491800__b84235270611821">job_queue_processes</strong> is not <strong id="EN-US_TOPIC_0000001764491800__b84235270611825">0</strong>), the system updates the value of <strong id="EN-US_TOPIC_0000001764491800__b1687213551155">job_status</strong> based on the real-time job status.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row18395917191511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__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_0000001764491800__p93958176154">Start time of the first job execution, precise to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row385172013159"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__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_0000001764491800__p1685720181518">Scheduled time of the next job execution, accurate to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row67841922101517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__p3785122241510">Smallint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__p1078522241515">Number of consecutive failures</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row1176016170244"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__p67611817112414">interval</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001764491800__p1761171772416">Text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__p13761191711245">Job execution interval</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row720472162418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__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_0000001764491800__p16205142110241">Start time of the last job execution, accurate to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row1988302372414"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__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_0000001764491800__p12883132313243">End time of the last job execution, accurate to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row1985182612242"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__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_0000001764491800__p1085182692417">Start time of the last successful job execution, accurate to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row926723342410"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__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_0000001764491800__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_0000001764491800__p6268123318242">Start time of the ongoing job execution, accurate to millisecond</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row1069419413361"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__p206951347360">nspname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001764491800__p1869520413619">Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__p136953483619">Name of the namespace where a job is running</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001764491800__row1648820913610"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491800__p74889915361">what</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001764491800__p44885917368">Text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491800__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>
|
|
|