Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf745739

Browse files
author
Amit Kapila
committed
Fix the display of lock information for specktoken.
A transaction id is now displayed in the transactionid field andspeculative insertion token is displayed in the objid field.Author: Sawada MasahikoReviewed-by: Amit KapilaDiscussion:https://postgr.es/m/CAD21AoCEKxZztULP1CDm45aSNNR1QO-Bh1q6LMTspQ78PBuJrw@mail.gmail.com
1 parentbd8d453 commitf745739

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

‎doc/src/sgml/system-views.sgml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,12 @@
15791579
permanent transaction ID of the current holder of that row lock.
15801580
</para>
15811581

1582+
<para>
1583+
A specualtive insertion lock consists of a transaction ID and a speculative
1584+
insertion token. The speculative insertion token is displayed in the
1585+
<structfield>objid</structfield> column.
1586+
</para>
1587+
15821588
<para>
15831589
Advisory locks can be acquired on keys consisting of either a single
15841590
<type>bigint</type> value or two integer values.

‎src/backend/utils/adt/lockfuncs.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,18 @@ pg_lock_status(PG_FUNCTION_ARGS)
313313
nulls[8]= true;
314314
nulls[9]= true;
315315
break;
316+
caseLOCKTAG_SPECULATIVE_TOKEN:
317+
values[6]=
318+
TransactionIdGetDatum(instance->locktag.locktag_field1);
319+
values[8]=ObjectIdGetDatum(instance->locktag.locktag_field2);
320+
nulls[1]= true;
321+
nulls[2]= true;
322+
nulls[3]= true;
323+
nulls[4]= true;
324+
nulls[5]= true;
325+
nulls[7]= true;
326+
nulls[9]= true;
327+
break;
316328
caseLOCKTAG_APPLY_TRANSACTION:
317329
values[1]=ObjectIdGetDatum(instance->locktag.locktag_field1);
318330
values[8]=ObjectIdGetDatum(instance->locktag.locktag_field2);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp