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>
777 lines
75 KiB
HTML
777 lines
75 KiB
HTML
<a name="EN-US_TOPIC_0000001233430153"></a><a name="EN-US_TOPIC_0000001233430153"></a>
|
|
|
|
<h1 class="topictitle1">Replication Functions</h1>
|
|
<div id="body1551942823550"><p id="EN-US_TOPIC_0000001233430153__p12419101612506">A replication function synchronizes logs and data between instances. It is a statistics or operation method provided by the system to implement HA.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001233430153__note177121328194914"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001233430153__p1945313557509">Replication functions except statistics queries are internal functions. You are not advised to use them directly.</p>
|
|
</div></div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section101064481549"><h4 class="sectiontitle">pg_create_logical_replication_slot('slot_name', 'plugin_name')</h4><p id="EN-US_TOPIC_0000001233430153__p7971136319">Description: Creates a logical replication slot.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p109773613116">Parameter:</p>
|
|
<ul id="EN-US_TOPIC_0000001233430153__ul129714361218"><li id="EN-US_TOPIC_0000001233430153__li397636313">slot_name<p id="EN-US_TOPIC_0000001233430153__p0982367113"><a name="EN-US_TOPIC_0000001233430153__li397636313"></a><a name="li397636313"></a>Indicates the name of the streaming replication slot.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p11991736917">Value range: a string, supporting only letters, digits, and the following special characters: _?-.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233430153__li1499133617117">plugin_name<p id="EN-US_TOPIC_0000001233430153__p899636519"><a name="EN-US_TOPIC_0000001233430153__li1499133617117"></a><a name="li1499133617117"></a>Indicates the name of the plugin.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p09919361812">Value range: a string, supporting only <strong id="EN-US_TOPIC_0000001233430153__b197771552182412">mppdb_decoding</strong></p>
|
|
</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233430153__p1210043615117">Return type: name, text</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p131005361919">Note: The first return value is the slot name, and the second is the start LSN position for decoding in the logical replication slot.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section69711116155515"><h4 class="sectiontitle">pg_create_physical_replication_slot ('slot_name', isDummyStandby)</h4><p id="EN-US_TOPIC_0000001233430153__p81008361510">Description: Creates a physical replication slot.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p5101836414">Parameter:</p>
|
|
<ul id="EN-US_TOPIC_0000001233430153__ul31012361110"><li id="EN-US_TOPIC_0000001233430153__li11101153610117">slot_name<p id="EN-US_TOPIC_0000001233430153__p171027361814"><a name="EN-US_TOPIC_0000001233430153__li11101153610117"></a><a name="li11101153610117"></a>Indicates the name of the streaming replication slot.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p8102236817">Value range: a string, supporting only letters, digits, and the following special characters: _?.-</p>
|
|
</li><li id="EN-US_TOPIC_0000001233430153__li161021536711">isDummyStandby<p id="EN-US_TOPIC_0000001233430153__p7103113615113"><a name="EN-US_TOPIC_0000001233430153__li161021536711"></a><a name="li161021536711"></a>Indicates whether the replication slot is the secondary one.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p111031361016">Value range: a boolean value, <strong id="EN-US_TOPIC_0000001233430153__b3968115164810">true</strong> or <strong id="EN-US_TOPIC_0000001233430153__b160810915484">false</strong></p>
|
|
</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233430153__p1210316369117">Return type: name, text</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p71031363114">Note: The first return value is the slot name, and the second is the start LSN position for decoding in the physical replication slot.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section10839144312568"><h4 class="sectiontitle">pg_get_replication_slots()</h4><p id="EN-US_TOPIC_0000001233430153__p2010412360116">Description: Displays information about all replication slots on the current DN.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p1810414367111">Return type: record</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p910418361616">The following information is returned:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233430153__table41059361015" frame="border" border="1" rules="all"><caption><b>Table 1 </b>pg_get_replication_slots() fields</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233430153__row1024216463"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.5.2.4.1.1"><p id="EN-US_TOPIC_0000001233430153__p1011517363118">Field</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.5.2.4.1.2"><p id="EN-US_TOPIC_0000001233430153__p61151366116">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.5.2.4.1.3"><p id="EN-US_TOPIC_0000001233430153__p1611615366116">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233430153__row182431168610"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p171164361416">slot_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1911617366111">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p61179368112">Replication slot name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row5243761961"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p111813361119">plugin</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p12118136718">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p17119103615115">Name of the output plug-in of the logical replication slot</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1124312613615"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p14119133610115">slot_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p112023611114">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p111211236817">Replication slot type</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row2024456367"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p10121936217">datoid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p31221236419">oid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p10122163612111">Replication slot's database OID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row182442618619"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p2123736118">active</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p121248364120">boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p131251336514">Whether the replication slot is active</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row15244166661"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p1512511361816">xmin</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1212611361111">xid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p1912703616112">Transaction ID of the replication slot</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row132451165620"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p61281136619">catalog_xmin</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p8129113620117">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p91300361415">ID of the earliest-decoded transaction corresponding to the logical replication slot.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row7581154132317"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p199219552238">restart_lsn</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p6826713112410">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p10582154142311">Xlog file information on the replication slot.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1850114722318"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p25021147112315">dummy_standby</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p150254717237">boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p850294712318">Indicates whether the replication slot is the secondary one.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001233430153__p18793171113272">Example:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233430153__screen1569972442711"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_get_replication_slots</span><span class="p">();</span>
|
|
<span class="w"> </span><span class="n">slot_name</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">plugin</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">slot_type</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">datoid</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">active</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">xmin</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">catalog_xmin</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">restart_lsn</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">dummy_standby</span>
|
|
<span class="c1">-----------------+--------+-----------+--------+--------+------+--------------+-------------------+---------------</span>
|
|
<span class="w"> </span><span class="n">gs_roach_common</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">physical</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">602861775</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">FFFFFFFF</span><span class="o">/</span><span class="n">FFFFFFFF</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">f</span>
|
|
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section723813175717"><h4 class="sectiontitle">pg_drop_replication_slot('slot_name')</h4><p id="EN-US_TOPIC_0000001233430153__p1313293611116">Description: Deletes a streaming replication slot.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p3132163616110">Parameter:</p>
|
|
<ul id="EN-US_TOPIC_0000001233430153__ul11132173617114"><li id="EN-US_TOPIC_0000001233430153__li20132173617118">slot_name<p id="EN-US_TOPIC_0000001233430153__p14133153618113"><a name="EN-US_TOPIC_0000001233430153__li20132173617118"></a><a name="li20132173617118"></a>Indicates the name of the streaming replication slot.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p41331362111">Value range: a string, supporting only letters, digits, and the following special characters: _?-.</p>
|
|
</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233430153__p181339361916">Return type: void</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section11251132145720"><a name="EN-US_TOPIC_0000001233430153__section11251132145720"></a><a name="section11251132145720"></a><h4 class="sectiontitle">pg_logical_slot_peek_changes('slot_name', 'LSN', upto_nchanges, 'options_name', 'options_value')</h4><p id="EN-US_TOPIC_0000001233430153__p161347364115">Description: Performs decoding but does not go to the next streaming replication slot. (The decoding result will be returned again on future calls.)</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p8134103618113">Parameter:</p>
|
|
<ul id="EN-US_TOPIC_0000001233430153__ul141358361411"><li id="EN-US_TOPIC_0000001233430153__li10135153613119">slot_name<p id="EN-US_TOPIC_0000001233430153__p8136536610"><a name="EN-US_TOPIC_0000001233430153__li10135153613119"></a><a name="li10135153613119"></a>Indicates the name of the streaming replication slot.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p213773610110">Value range: a string, supporting only letters, digits, and the following special characters: _?-.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233430153__li1313717361411">LSN<p id="EN-US_TOPIC_0000001233430153__p41372362117"><a name="EN-US_TOPIC_0000001233430153__li1313717361411"></a><a name="li1313717361411"></a>Indicates a target LSN. Decoding is performed only when an LSN is less than or equal to this value.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p51371236113">Value range: a string, in the format of xlogid/xrecoff, for example, '1/2AAFC60' (If this parameter is set to <strong id="EN-US_TOPIC_0000001233430153__b825517515505">NULL</strong>, the target LSN indicating the end position of decoding is not specified.)</p>
|
|
</li><li id="EN-US_TOPIC_0000001233430153__li18138536716">upto_nchanges<p id="EN-US_TOPIC_0000001233430153__p1113820361917"><a name="EN-US_TOPIC_0000001233430153__li18138536716"></a><a name="li18138536716"></a>Indicates the number of decoded records (including the <strong id="EN-US_TOPIC_0000001233430153__b9377124715210">begin</strong> and <strong id="EN-US_TOPIC_0000001233430153__b1083854811526">commit</strong> timestamps). Assume that there are three transactions, which involve 3, 5, and 7 records, respectively. If <strong id="EN-US_TOPIC_0000001233430153__b960620154533">upto_nchanges</strong> is <strong id="EN-US_TOPIC_0000001233430153__b21981122155310">4</strong>, 8 records of the first two transactions will be decoded. Specifically, decoding is stopped when the number of decoded records exceeds 4 after decoding in the first two transactions is finished.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p51382360117">Value range: a non-negative integer</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001233430153__note101393361315"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001233430153__p1614012360113">If any of the <strong id="EN-US_TOPIC_0000001233430153__b104021234186">LSN</strong> and <strong id="EN-US_TOPIC_0000001233430153__b1290306191817">upto_nchanges</strong> values are reached, decoding ends.</p>
|
|
</div></div>
|
|
</li><li id="EN-US_TOPIC_0000001233430153__li114023612111">options (optional)<ul id="EN-US_TOPIC_0000001233430153__ul2014111361114"><li id="EN-US_TOPIC_0000001233430153__li31412364114">include-xids<p id="EN-US_TOPIC_0000001233430153__p714213361715"><a name="EN-US_TOPIC_0000001233430153__li31412364114"></a><a name="li31412364114"></a>Indicates whether the decoded <strong id="EN-US_TOPIC_0000001233430153__b859196578">data</strong> column contains XID information.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p714220368110">Valid value: <strong id="EN-US_TOPIC_0000001233430153__b1431113458577">0</strong> and <strong id="EN-US_TOPIC_0000001233430153__b5844144810577">1</strong>. The default value is <strong id="EN-US_TOPIC_0000001233430153__b197064417584">1</strong>.</p>
|
|
<ul id="EN-US_TOPIC_0000001233430153__ul914216369110"><li id="EN-US_TOPIC_0000001233430153__li171425361119"><strong id="EN-US_TOPIC_0000001233430153__b1799310955810">0</strong>: The decoded <strong id="EN-US_TOPIC_0000001233430153__b7110818195813">data</strong> column does not contain XID information.</li><li id="EN-US_TOPIC_0000001233430153__li914313611110"><strong id="EN-US_TOPIC_0000001233430153__b93541230145813">1</strong>: The decoded <strong id="EN-US_TOPIC_0000001233430153__b1535783615583">data</strong> column contains XID information.</li></ul>
|
|
</li><li id="EN-US_TOPIC_0000001233430153__li914318363115">skip-empty-xacts<p id="EN-US_TOPIC_0000001233430153__p314453613113"><a name="EN-US_TOPIC_0000001233430153__li914318363115"></a><a name="li914318363115"></a>Indicates whether to ignore empty transaction information during decoding.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p191441361017">Valid value: <strong id="EN-US_TOPIC_0000001233430153__b119689147598">0</strong> and <strong id="EN-US_TOPIC_0000001233430153__b49701514195914">1</strong>. The default value is <strong id="EN-US_TOPIC_0000001233430153__b1497214143598">0</strong>.</p>
|
|
<ul id="EN-US_TOPIC_0000001233430153__ul161442365112"><li id="EN-US_TOPIC_0000001233430153__li21442369116"><strong id="EN-US_TOPIC_0000001233430153__b4717183311598">0</strong>: The empty transaction information is not ignored during decoding.</li><li id="EN-US_TOPIC_0000001233430153__li21450368117"><strong id="EN-US_TOPIC_0000001233430153__b208801753185913">1</strong>: The empty transaction information is ignored during decoding.</li></ul>
|
|
</li><li id="EN-US_TOPIC_0000001233430153__li1145123614119">include-timestamp<p id="EN-US_TOPIC_0000001233430153__p1914518361118"><a name="EN-US_TOPIC_0000001233430153__li1145123614119"></a><a name="li1145123614119"></a>Indicates whether decoding information contains the <strong id="EN-US_TOPIC_0000001233430153__b1949613819120">commit</strong> timestamp.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p2146123613110">Valid value: <strong id="EN-US_TOPIC_0000001233430153__b10230445116">0</strong> and <strong id="EN-US_TOPIC_0000001233430153__b14231345814">1</strong>. The default value is <strong id="EN-US_TOPIC_0000001233430153__b2023244518113">0</strong>.</p>
|
|
<ul id="EN-US_TOPIC_0000001233430153__ul1814603619112"><li id="EN-US_TOPIC_0000001233430153__li1146936519"><strong id="EN-US_TOPIC_0000001233430153__b4738451625">0</strong>: The decoding information does not contain the <strong id="EN-US_TOPIC_0000001233430153__b134685371214">commit</strong> timestamp.</li><li id="EN-US_TOPIC_0000001233430153__li714612361916"><strong id="EN-US_TOPIC_0000001233430153__b06931052726">1</strong>: The decoding information contains the <strong id="EN-US_TOPIC_0000001233430153__b5693195219218">commit</strong> timestamp.</li></ul>
|
|
</li></ul>
|
|
</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233430153__p31471636916">Return type: text, uint, text</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p1014711361518">Note: The function returns the decoding result. Each decoding result contains three columns, corresponding to the above return types and indicating the LSN position, XID, and decoded content, respectively.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section96020110582"><h4 class="sectiontitle">pg_logical_slot_get_changes('slot_name', 'LSN', upto_nchanges, 'options_name', 'options_value')</h4><p id="EN-US_TOPIC_0000001233430153__p18148133617118">Description: Performs decoding and goes to the next streaming replication slot.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p19148936614">Parameter: This function has the same parameters as <strong id="EN-US_TOPIC_0000001233430153__b176958994794110">pg_logical_slot_peek_changes</strong>. For details, see <a href="#EN-US_TOPIC_0000001233430153__section11251132145720">pg_logical_slot_peek_changes('slot_name', 'LSN', upto_nchanges, 'options_name', 'options_value')</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section963749185813"><h4 class="sectiontitle">pg_replication_slot_advance ('slot_name', 'LSN')</h4><p id="EN-US_TOPIC_0000001233430153__p15149143616115">Description: Directly goes to the streaming replication slot for a specified LSN, without outputting any decoding result.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p151493362011">Parameter:</p>
|
|
<ul id="EN-US_TOPIC_0000001233430153__ul20149133619118"><li id="EN-US_TOPIC_0000001233430153__li514913361717">slot_name<p id="EN-US_TOPIC_0000001233430153__p15149193616116"><a name="EN-US_TOPIC_0000001233430153__li514913361717"></a><a name="li514913361717"></a>Indicates the name of the streaming replication slot.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p101502361215">Value range: a string, supporting only letters, digits, and the following special characters: _?-.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233430153__li1015015364111">LSN<p id="EN-US_TOPIC_0000001233430153__p115010367120"><a name="EN-US_TOPIC_0000001233430153__li1015015364111"></a><a name="li1015015364111"></a>Indicates a target LSN. Next decoding will be performed only in transactions whose commission position is greater than this value. If an input LSN is smaller than the position recorded in the current streaming replication slot, the function directly returns. If the input LSN is greater than the LSN of the current physical log, the latter LSN will be directly used for decoding.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p191510363112">Value range: a string, in the format of xlogid/xrecoff</p>
|
|
</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233430153__p11511636915">Return type: name, text</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p1015116362116">Note: A return result contains the slot name and LSN that is actually used for decoding.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section209452916594"><h4 class="sectiontitle">pg_stat_get_data_senders()</h4><p id="EN-US_TOPIC_0000001233430153__p12152143619111">Description: Displays statistics about replication sending threads on all data page on the current DN.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p1315212361314">Return type: record</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p515273616113">The following information is returned:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233430153__table181521136112" frame="border" border="1" rules="all"><caption><b>Table 2 </b>pg_stat_get_data_senders() fields</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233430153__row1047920513917"><th align="left" class="cellrowborder" valign="top" width="26.090000000000003%" id="mcps1.3.10.5.2.4.1.1"><p id="EN-US_TOPIC_0000001233430153__p181631364110">Field</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.11%" id="mcps1.3.10.5.2.4.1.2"><p id="EN-US_TOPIC_0000001233430153__p1416419361718">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50.8%" id="mcps1.3.10.5.2.4.1.3"><p id="EN-US_TOPIC_0000001233430153__p171651736812">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233430153__row15479145192"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p31651436913">pid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p14166436914">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p141666364113">Thread PID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row144791055911"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p10167536516">sender_pid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p191677367119">integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p11168193610117">Current sender PID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row54801451896"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p61681362014">local_role</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p61691036611">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p1616963613114">Local role</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row84801658918"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p0170123617113">peer_role</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p517063613116">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p717115361419">Peer role</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row74805517916"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p1817111366111">state</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p131721636516">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p31744361815">Current sender's replication status</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row18480651791"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p4175163615113">catchup_start</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p171751136714">timestamp with time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p917693617112">Startup time of a catchup task</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row143631418124416"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p71766364110">catchup_end</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p5176836217">timestamp with time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p121779368113">End time of a catchup task</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row152196498443"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p191776366110">queue_size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p111789363112">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p8178113612113">Data queue size</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row150217533445"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p517911361814">queue_lower_tail</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p12180173612111">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p2180133613112">Position of data queue tail 1</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row11755145174712"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p818119361313">queue_header</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p18181103615113">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p1218193612111">Position of data queue header</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1197310654718"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p118283619119">queue_upper_tail</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p14182136519">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p91831036316">Position of data queue tail 2</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1612718864719"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p518333620119">send_position</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p51841436019">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p91847362120">Sending position of the sender</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row493511133476"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p181856361813">receive_position</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p618519366111">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p151862036713">Receiving position of the receiver</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1947117194714"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p101861836111">catchup_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p81865361915">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p111875361916">Catchup task type, full or incremental</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1310481844713"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p6187183615113">catchup_bcm_filename</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1188133618117">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p1188136812">BCM file executed by the current catchup task</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row17255131912479"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p01891936511">catchup_bcm_finished</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p151902363113">integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p4191103615110">Number of BCM files completed by a catchup task</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row5255102111476"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p8191336414">catchup_bcm_total</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p7191173617117">integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p121922361412">Total number of BCM files to be operated by a catchup task</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row21141033115016"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p219212361712">catchup_percent</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1319333619118">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p11193133620110">Completion percentage of a catchup task</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1256234155018"><td class="cellrowborder" valign="top" width="26.090000000000003%" headers="mcps1.3.10.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p81941436611">catchup_remaining_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.11%" headers="mcps1.3.10.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p41941036011">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.8%" headers="mcps1.3.10.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p119523620119">Estimated remaining time of a catchup task</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section753225205915"><h4 class="sectiontitle">pg_stat_get_wal_senders()</h4><p id="EN-US_TOPIC_0000001233430153__p201953361120">Description: Displays statistics about replication sending threads on all WALs on the current DN.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p719633618119">Return type: record</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p1019673612117">The following information is returned:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233430153__table171961367116" frame="border" border="1" rules="all"><caption><b>Table 3 </b>pg_stat_get_wal_senders() fields</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233430153__row161168427106"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.5.2.4.1.1"><p id="EN-US_TOPIC_0000001233430153__p1320919361618">Field</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.5.2.4.1.2"><p id="EN-US_TOPIC_0000001233430153__p18210236115">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.5.2.4.1.3"><p id="EN-US_TOPIC_0000001233430153__p0210113615111">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233430153__row17117134291019"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p1721123620117">pid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1421183618115">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p192121360110">Thread PID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row14117164281012"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p521312362119">sender_pid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p10213636315">integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p15213103615119">Current sender PID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row6118042131011"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p19214436012">local_role</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p12215183612112">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p112159364111">Local role</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row211864215101"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p621611367113">peer_role</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p721619365119">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p192170361313">Peer role</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1811814251011"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p52174362111">peer_state</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p621723612110">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p72181136913">Peer status</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1511918426106"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p221863615112">state</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p62192369118">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p182193364115">Current sender's replication status</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row10119184221013"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p122019366118">catchup_start</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p922111367111">timestamp with time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p1022314361211">Startup time of a catchup task</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row08621570112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p1822318361316">catchup_end</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p19224143617118">timestamp with time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p1422515366118">End time of a catchup task</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row786412711110"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p4225103613119">sender_sent_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p122615361115">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p3226173616119">Location where the sender sends LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1986517111112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p522783617118">sender_write_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p142287364120">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p5228236918">Location where the sender writes LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row198651773119"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p182291367120">sender_flush_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p022933613110">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p122305368112">Location where the sender flushes LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row086657111114"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p723118361710">sender_replay_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1423143613116">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p1232236419">Location where the sender replays LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row148662714111"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p32322361416">receiver_received_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1123363615110">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p323353616113">Location where the receiver receives LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1286711713111"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p1234836619">receiver_write_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p8234163615119">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p1623573617112">Location where the receiver writes LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row16967813151115"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p523616361717">receiver_flush_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1223611363111">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p42364361616">Location where the receiver flushes LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row13968111318117"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p523793614120">receiver_replay_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p18237103610116">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p32381536811">Location where the receiver replays LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row179681413191118"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p82381836218">sync_percent</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p19239193611114">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p2239736812">Specifies the synchronization percentage.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row5969161321112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p1924013619112">sync_state</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1024012367120">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p824113361217">Synchronization state (asynchronous duplication, synchronous duplication, or potential synchronization)</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1696921391118"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p10241136516">sync_priority</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p112418362013">integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p7242036715">Priority of synchronous duplication (<strong id="EN-US_TOPIC_0000001233430153__b842352706224457">0</strong> indicates asynchronization)</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row19705133112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p824220369111">sync_most_available</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p724414361618">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p924463611114">Whether to block the active node when the synchronization on the standby node fails</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row2970151318114"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p20245133613110">channel</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p2245163619111">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p2246103617112">WALSender channel information</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section883571314010"><h4 class="sectiontitle">pg_stat_get_wal_receiver()</h4><p id="EN-US_TOPIC_0000001233430153__p5246536117">Description: Displays statistics about replication receiving threads on all WALs on the current DN.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p1624715361814">Return type: record</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p11247236512">The following information is returned:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233430153__table19247163612119" frame="border" border="1" rules="all"><caption><b>Table 4 </b>pg_stat_get_wal_receiver()</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233430153__row168417413125"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.12.5.2.4.1.1"><p id="EN-US_TOPIC_0000001233430153__p12254173615119">Field</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.12.5.2.4.1.2"><p id="EN-US_TOPIC_0000001233430153__p7255836911">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.12.5.2.4.1.3"><p id="EN-US_TOPIC_0000001233430153__p12256336510">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233430153__row084104151213"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p1725613366114">receiver_pid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p2257113612120">integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p025793619113">Current receiver PID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row128411451213"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p225815361410">local_role</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p925813619118">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p22590361213">Local role</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row285240123"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p725910364113">peer_role</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1326013616111">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p226018367114">Peer role</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row128517410128"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p92611362111">peer_state</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1926120361217">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p526213615116">Peer status</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row285842123"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p7262153614114">state</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p52638361218">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p726312364119">Current receiver's replication status</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row7851413124"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p72631136518">sender_sent_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p132641636414">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p14265436616">Location where the sender sends LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1386184101214"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p152655367117">sender_write_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p326673613116">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p526713362110">Location where the sender writes LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row188931315171215"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p112671036311">sender_flush_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p15268436910">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p626820367111">Location where the sender flushes LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row6893115141211"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p102698361210">sender_replay_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1026933613119">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p62701365114">Location where the sender replays LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row178941215171217"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p127016361712">receiver_received_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p7270836518">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p152712362114">Location where the receiver receives LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row148941015111213"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p92711836615">receiver_write_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p827214366111">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p827213617116">Location where the receiver writes LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row2089431518129"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p172723369115">receiver_flush_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p82738361813">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p62737361711">Location where the receiver flushes LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row782622111213"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p827420365110">receiver_replay_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p202749361715">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p182752361511">Location where the receiver replays LSNs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row6827192110123"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p1927613361017">sync_percent</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p22769360116">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p32763364112">Specifies the synchronization percentage.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row582712212122"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p92776367110">channel</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.12.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p142772368120">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p1027816361712">WALReceiver channel information</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section11296153213014"><h4 class="sectiontitle">pg_stat_get_stream_replications()</h4><p id="EN-US_TOPIC_0000001233430153__p1927918361318">Description: Displays information about all replication statistics on the current DN.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p1527912364119">Return type: record</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p18279936616">The following information is returned:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233430153__table4279153619116" frame="border" border="1" rules="all"><caption><b>Table 5 </b>pg_stat_get_stream_replications()</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233430153__row16620161512135"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.13.5.2.4.1.1"><p id="EN-US_TOPIC_0000001233430153__p328316360116">Field</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.13.5.2.4.1.2"><p id="EN-US_TOPIC_0000001233430153__p328312363113">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.13.5.2.4.1.3"><p id="EN-US_TOPIC_0000001233430153__p22831836817">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233430153__row7620915101319"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.13.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p52842036318">local_role</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.13.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p182858361617">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p122864363116">Local role</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row8620131514134"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.13.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p142873368117">static_connections</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.13.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1028710362017">integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p32881636716">Connection statistics</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row76219157131"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.13.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p7288836511">db_state</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.13.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p928943620119">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p8289183613111">Database status</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row106211215151314"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.13.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p12289143619120">detail_information</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.13.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1629016361417">text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p829053616116">Detail information</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001233430153__p18581242317">Example:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233430153__screen77691612218"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_stat_get_stream_replications</span><span class="p">();</span>
|
|
<span class="w"> </span><span class="n">local_role</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">static_connections</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">db_state</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">detail_information</span>
|
|
<span class="c1">------------+--------------------+----------+--------------------</span>
|
|
<span class="w"> </span><span class="n">Normal</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">Normal</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">Normal</span>
|
|
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section2240847101"><h4 class="sectiontitle">pg_stat_xlog_space()</h4><p id="EN-US_TOPIC_0000001233430153__p8291636217">Description: Displays the Xlog space usage on the current DN.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p629119365119">Return type: record</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p1629110360120">The following information is returned:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233430153__table2029210361711" frame="border" border="1" rules="all"><caption><b>Table 6 </b>pg_stat_xlog_space()</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233430153__row102102149513"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.14.5.2.4.1.1"><p id="EN-US_TOPIC_0000001233430153__p1429423613115">Column</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.14.5.2.4.1.2"><p id="EN-US_TOPIC_0000001233430153__p10295103614110">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.14.5.2.4.1.3"><p id="EN-US_TOPIC_0000001233430153__p629663619117">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233430153__row921171475112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.14.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p17297536719">xlog_files</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.14.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p13297103613112">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p32978361311">Number of all identified xlog files in the <strong id="EN-US_TOPIC_0000001233430153__b41391443174310">pg_xlog</strong> directory, excluding the <strong id="EN-US_TOPIC_0000001233430153__b1268320538437">backup</strong> and <strong id="EN-US_TOPIC_0000001233430153__b566775604319">archive_status</strong> subdirectories.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row32111914185119"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.14.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p1129812360119">xlog_size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.14.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p629812367113">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p329912361810">Total size (MB) of all identified xlog files in the <strong id="EN-US_TOPIC_0000001233430153__b891563318446">pg_xlog</strong> directory, excluding the <strong id="EN-US_TOPIC_0000001233430153__b1391184011443">backup</strong> and <strong id="EN-US_TOPIC_0000001233430153__b141631344114415">archive_status</strong> subdirectories.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1321181495114"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.14.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p729916361713">other_size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.14.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1330011361013">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p430018362011">Total size (MB) of files in the <strong id="EN-US_TOPIC_0000001233430153__b40805139194110">backup</strong> and <strong id="EN-US_TOPIC_0000001233430153__b66936558194110">archive_status</strong> subdirectories of the <strong id="EN-US_TOPIC_0000001233430153__b97657880094110">pg_xlog</strong> directory.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001233430153__p636081616420">Example:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233430153__screen4989182914812"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_stat_xlog_space</span><span class="p">();</span>
|
|
<span class="w"> </span><span class="n">xlog_files</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">xlog_size</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">other_size</span>
|
|
<span class="c1">------------+-----------+------------</span>
|
|
<span class="w"> </span><span class="mi">79</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1264</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span>
|
|
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233430153__section154940615"><h4 class="sectiontitle">pgxc_stat_xlog_space()</h4><p id="EN-US_TOPIC_0000001233430153__p1630114364115">Description: Displays the Xlog space usage on all active DNs.</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p4301636814">Return type: record</p>
|
|
<p id="EN-US_TOPIC_0000001233430153__p173011361311">The following information is returned:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233430153__table230116361118" frame="border" border="1" rules="all"><caption><b>Table 7 </b>pgxc_stat_xlog_space()</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233430153__row750517162511"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.15.5.2.4.1.1"><p id="EN-US_TOPIC_0000001233430153__p1030414361118">Column</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.15.5.2.4.1.2"><p id="EN-US_TOPIC_0000001233430153__p1530510361713">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.15.5.2.4.1.3"><p id="EN-US_TOPIC_0000001233430153__p1830513611112">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233430153__row1505171615519"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.15.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p12306123610115">node_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.15.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p1630683615115">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.15.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p1230703614111">Node name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row1950511615513"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.15.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p730717361418">xlog_files</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.15.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p2308336218">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.15.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p20308113619115">Number of all identified xlog files in the <strong id="EN-US_TOPIC_0000001233430153__b1783412586">pg_xlog</strong> directory, excluding the <strong id="EN-US_TOPIC_0000001233430153__b2103961139">backup</strong> and <strong id="EN-US_TOPIC_0000001233430153__b2075386525">archive_status</strong> subdirectories.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row8505151617511"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.15.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p73088363111">xlog_size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.15.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p83099363114">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.15.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p330914361418">Total size (MB) of all identified xlog files in the <strong id="EN-US_TOPIC_0000001233430153__b2142474433">pg_xlog</strong> directory, excluding the <strong id="EN-US_TOPIC_0000001233430153__b876270674">backup</strong> and <strong id="EN-US_TOPIC_0000001233430153__b1322222084">archive_status</strong> subdirectories.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233430153__row6506151635115"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.15.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001233430153__p10310536811">other_size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.15.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001233430153__p73102364114">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.15.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001233430153__p531110361116">Total size (MB) of files in the <strong id="EN-US_TOPIC_0000001233430153__b201666441294110">backup</strong> and <strong id="EN-US_TOPIC_0000001233430153__b105909557994110">archive_status</strong> subdirectories of the <strong id="EN-US_TOPIC_0000001233430153__b118157547594110">pg_xlog</strong> directory.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001233430153__p0299529796">Example:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233430153__screen211274720919"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span></pre></div></td><td class="code"><div><pre><span></span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pgxc_stat_xlog_space</span><span class="p">();</span>
|
|
<span class="w"> </span><span class="n">node_name</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">xlog_files</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">xlog_size</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">other_size</span>
|
|
<span class="c1">--------------+------------+-----------+------------</span>
|
|
<span class="w"> </span><span class="n">dn_6001_6002</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">73</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1168</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span>
|
|
<span class="w"> </span><span class="n">dn_6003_6004</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">73</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1168</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span>
|
|
<span class="w"> </span><span class="n">dn_6005_6006</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">73</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1168</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span>
|
|
<span class="w"> </span><span class="n">cn_5003</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">79</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1264</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span>
|
|
<span class="w"> </span><span class="n">cn_5001</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">72</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1152</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span>
|
|
<span class="w"> </span><span class="n">cn_5002</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">73</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1168</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span>
|
|
<span class="p">(</span><span class="mi">6</span><span class="w"> </span><span class="k">rows</span><span class="p">)</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_06_0052.html">System Administration Functions</a></div>
|
|
</div>
|
|
</div>
|
|
|