Fix the display of lock information for specktoken.
A transaction id is now displayed in the transactionid field and speculative insertion token is displayed in the objid field. Author: Sawada Masahiko Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/CAD21AoCEKxZztULP1CDm45aSNNR1QO-Bh1q6LMTspQ78PBuJrw@mail.gmail.com
This commit is contained in:
parent
bd8d453e9b
commit
f745739697
@ -1579,6 +1579,12 @@
|
|||||||
permanent transaction ID of the current holder of that row lock.
|
permanent transaction ID of the current holder of that row lock.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
A specualtive insertion lock consists of a transaction ID and a speculative
|
||||||
|
insertion token. The speculative insertion token is displayed in the
|
||||||
|
<structfield>objid</structfield> column.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Advisory locks can be acquired on keys consisting of either a single
|
Advisory locks can be acquired on keys consisting of either a single
|
||||||
<type>bigint</type> value or two integer values.
|
<type>bigint</type> value or two integer values.
|
||||||
|
@ -313,6 +313,18 @@ pg_lock_status(PG_FUNCTION_ARGS)
|
|||||||
nulls[8] = true;
|
nulls[8] = true;
|
||||||
nulls[9] = true;
|
nulls[9] = true;
|
||||||
break;
|
break;
|
||||||
|
case LOCKTAG_SPECULATIVE_TOKEN:
|
||||||
|
values[6] =
|
||||||
|
TransactionIdGetDatum(instance->locktag.locktag_field1);
|
||||||
|
values[8] = ObjectIdGetDatum(instance->locktag.locktag_field2);
|
||||||
|
nulls[1] = true;
|
||||||
|
nulls[2] = true;
|
||||||
|
nulls[3] = true;
|
||||||
|
nulls[4] = true;
|
||||||
|
nulls[5] = true;
|
||||||
|
nulls[7] = true;
|
||||||
|
nulls[9] = true;
|
||||||
|
break;
|
||||||
case LOCKTAG_APPLY_TRANSACTION:
|
case LOCKTAG_APPLY_TRANSACTION:
|
||||||
values[1] = ObjectIdGetDatum(instance->locktag.locktag_field1);
|
values[1] = ObjectIdGetDatum(instance->locktag.locktag_field1);
|
||||||
values[8] = ObjectIdGetDatum(instance->locktag.locktag_field2);
|
values[8] = ObjectIdGetDatum(instance->locktag.locktag_field2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user