doc-exports/docs/dws/dev/dws_04_0733.html
Lu, Huayi a24ca60074 DWS DEVELOPER 811 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-01-19 13:37:49 +00:00

147 lines
14 KiB
HTML

<a name="EN-US_TOPIC_0000001145494583"></a><a name="EN-US_TOPIC_0000001145494583"></a>
<h1 class="topictitle1">PG_JOB</h1>
<div id="body1599815907173"><p id="EN-US_TOPIC_0000001145494583__p021219202209">The <strong id="EN-US_TOPIC_0000001145494583__b119471724155810">PG_JOB</strong> view replaces the <strong id="EN-US_TOPIC_0000001145494583__b183112475585">PG_JOB</strong> system catalog in earlier versions and provides forward compatibility with earlier versions. The original <strong id="EN-US_TOPIC_0000001145494583__b19491575912">PG_JOB</strong> system catalog is changed to the <strong id="EN-US_TOPIC_0000001145494583__b145411725135913">PG_JOBS</strong> system catalog. For details about <strong id="EN-US_TOPIC_0000001145494583__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_0000001145494583__t9ec63a5df95b4f61ae3d9194bcb47d74" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_JOB columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001145494583__en-us_topic_0059778581_row5106215531"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001145494583__a65781afeccb04be195fc89bfda9ad930">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001145494583__ad4cced91bf064f95b1b0f2a1db21b3f4">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001145494583__en-us_topic_0059778581_p910651155317">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001145494583__r1a913116e97a4c88bb26769f05cea246"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p10531181312206">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p752917135206">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p115271513202016">Job ID</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row22841961011"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p72859931011">current_postgres_pid</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p172858917107">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__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_0000001145494583__b842352706172928">-1</strong>, indicating that the job has not yet been executed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row93015071417"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p12317503141">log_user</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p13145015140">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p13195011412">User name of the job creator</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row688175531413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p1788165551416">priv_user</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p788195517149">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p388185531410">User name of the job executor</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row124861258191415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p348675881418">dbname</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p14486195861414">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p748635817141">Name of the database where the job is executed</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row8476151211512"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p547691210156">node_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p9476111215151">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p144761712191510">CN node on which the job will be created and executed</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row68621314171511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p18862131471512">job_status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p6862191416153">text</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p7986302199">Status of the current job. The value range is <strong id="EN-US_TOPIC_0000001145494583__b144632581413">r</strong>, <strong id="EN-US_TOPIC_0000001145494583__b2496601423">s</strong>, <strong id="EN-US_TOPIC_0000001145494583__b20487951721">f</strong>, or <strong id="EN-US_TOPIC_0000001145494583__b933616811214">d</strong>. The default value is <strong id="EN-US_TOPIC_0000001145494583__a1fa41e25da3c496c9b7e4f7c20609732">s</strong>. The indications are as follows:</p>
<ul id="EN-US_TOPIC_0000001145494583__ul571114153198"><li id="EN-US_TOPIC_0000001145494583__li19711141551916">r=running</li><li id="EN-US_TOPIC_0000001145494583__li871212150199">s=successfully finished</li><li id="EN-US_TOPIC_0000001145494583__li17712715171918">f=job failed</li><li id="EN-US_TOPIC_0000001145494583__li2712191518195">d=disable</li></ul>
<p id="EN-US_TOPIC_0000001145494583__p610321821716">If a job fails to be executed for 16 consecutive times, <strong id="EN-US_TOPIC_0000001145494583__b842352706144344">job_status</strong> is automatically set to <strong id="EN-US_TOPIC_0000001145494583__b204292623614446">d</strong>, and no more attempt will be made on this job.</p>
<div class="note" id="EN-US_TOPIC_0000001145494583__note81622539192"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="EN-US_TOPIC_0000001145494583__ul4961338132213"><li id="EN-US_TOPIC_0000001145494583__li174081043132214">Note: When you disable a scheduled task (by setting <strong id="EN-US_TOPIC_0000001145494583__b7541111318254">job_queue_processes</strong> to <strong id="EN-US_TOPIC_0000001145494583__b842352706105039">0</strong>), the thread monitor the job execution is not started, and the <strong id="EN-US_TOPIC_0000001145494583__b1664712294318">job_status</strong> will not be updated. You can ignore the <strong id="EN-US_TOPIC_0000001145494583__b759910511838">job_status</strong>.</li><li id="EN-US_TOPIC_0000001145494583__li79611038132215">Only when the scheduled task function is enabled (that is, when <strong id="EN-US_TOPIC_0000001145494583__b84235270611821">job_queue_processes</strong> is not <strong id="EN-US_TOPIC_0000001145494583__b84235270611825">0</strong>), the system updates the value of <strong id="EN-US_TOPIC_0000001145494583__b1687213551155">job_status</strong> based on the real-time job status.</li></ul>
</div></div>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row18395917191511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p7395517131513">start_date</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p1244410341198">timestamp without time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p93958176154">Start time of the first job execution, precise to millisecond</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row385172013159"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p18552017159">next_run_date</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p128517201155">timestamp without time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p1685720181518">Scheduled time of the next job execution, accurate to millisecond</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row67841922101517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p11785122211518">failure_count</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p3785122241510">smallint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p1078522241515">Number of times the job has started and failed. If a job fails to be executed for 16 consecutive times, no more attempt will be made on it.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row1176016170244"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p67611817112414">interval</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p1761171772416">text</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p13761191711245">Job execution interval</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row720472162418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p15205172112413">last_start_date</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p10205162118246">timestamp without time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p16205142110241">Start time of the last job execution, accurate to millisecond</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row1988302372414"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p20883182312419">last_end_date</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p38839236243">timestamp without time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p12883132313243">End time of the last job execution, accurate to millisecond</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row1985182612242"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p158511263247">last_suc_date</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p88513264247">timestamp without time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p1085182692417">Start time of the last successful job execution, accurate to millisecond</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row926723342410"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p726810331249">this_run_date</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p4268203302413">timestamp without time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p6268123318242">Start time of the ongoing job execution, accurate to millisecond</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row1069419413361"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p206951347360">nspname</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p1869520413619">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__p136953483619">Name of the namespace where a job is running</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494583__row1648820913610"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494583__p74889915361">what</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494583__p44885917368">text</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494583__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>