db-locks.adp

Delivered as text/html

Related Files

[ hide source ] | [ make this the default ]

File Contents

<master>
<property name="title">Currently active DB-Locks</property>
<property name="show_title">1</property>


<h2>Current active locks grouped by processes</h2>
<p><a href="http://www.postgresql.org/docs/8.2/interactive/explicit-locking.htm">Postgres Locking Docs</a></p>

<multiple name="locks">
    <table class="list" cellpadding="3" cellspacing="1">
        <tr>
            <th class="list">PID</th>
            <th class="list">Client IP</th>
            <th class="list">Query</th>
            <th class="list">Start</th>
            <th class="list">Age</th>
        </tr>
        <tr class="list-odd">
            <td class="list">@locks.pid@</td>
            <td class="list">@locks.client_addr@</td>
            <td class="list">@locks.current_query@</td>
            <td class="list">@locks.query_start@</td>
            <td class="list">@locks.age@</td>
        </tr>
    </table>
    <table style="margin-left:15px;margin-right:15px;margin-top:15px;"  class="list">
        <tr>
            <th class="list">Locked Relation</th>
            <th class="list">Relation Type</th>
            <th class="list">Page</th>
            <th class="list">Tuple</th>
            <th class="list">Virtualtransaction</th>
            <th class="list">Transactionid</th>
            <th class="list">Mode</th>
            <th class="list">Granted</th>
        </tr>
    <group column="pid">
        <tr <if @locks.rownum@ odd>class="list-odd"</if><else>class="list-even"</else>>
            <td class="list">@locks.relname@</td>
            <td class="list">
                <switch @locks.relkind@>
                    <case value="r">Table</case>
                    <case value="i">Index</case>
                    <case value="s">Sequence</case>
                    <case value="v">View</case>
                    <case value="c">Composite Type</case>
                    <case value="t">TOAST Table</case>                    
                </switch>
            </td>
            <td class="list">@locks.page@</td>
             <td class="list">@locks.tuple@</td>
            <td class="list">@locks.virtualtransaction@</td>
            <td class="list">@locks.transactionid@</td>
            <td class="list">@locks.mode@</td>
            <td class="list">@locks.granted@</td>
        </tr>        
    </group>
    </table>
    <hr>
</multiple>