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

Commit15d5d74

Browse files
committed
pgrowlocks: change lock mode output labels for consistency
Change "Share" to "For Share" and "Key Share" to "For Key Share" forconsistency with other lock mode labels.BACKWARD COMPATIBILITY BREAKReported-by: David CookDiscussion:https://postgr.es/m/CA+dNBPNBf+FCEwohe7SH1tSks0R_G4F=tuvM=hnPs4qWiAH8vg@mail.gmail.comBackpatch-through: master
1 parent1b5a004 commit15d5d74

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

‎contrib/pgrowlocks/expected/pgrowlocks.out

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ a|b
136136
(2 rows)
137137

138138
step s2_rowlocks: SELECT locked_row, multi, modes FROM pgrowlocks('multixact_conflict');
139-
locked_row|multi|modes
140-
----------+-----+-------------------
141-
(0,1) |t |{"Key Share",Share}
142-
(0,2) |t |{"Key Share",Share}
139+
locked_row|multi|modes
140+
----------+-----+-----------------------------
141+
(0,1) |t |{"ForKey Share","ForShare"}
142+
(0,2) |t |{"ForKey Share","ForShare"}
143143
(2 rows)
144144

145145
step s1_commit: COMMIT;
@@ -161,10 +161,10 @@ a|b
161161
(2 rows)
162162

163163
step s2_rowlocks: SELECT locked_row, multi, modes FROM pgrowlocks('multixact_conflict');
164-
locked_row|multi|modes
165-
----------+-----+---------------------------------
166-
(0,1) |t |{"Key Share","For No Key Update"}
167-
(0,2) |t |{"Key Share","For No Key Update"}
164+
locked_row|multi|modes
165+
----------+-----+-------------------------------------
166+
(0,1) |t |{"ForKey Share","For No Key Update"}
167+
(0,2) |t |{"ForKey Share","For No Key Update"}
168168
(2 rows)
169169

170170
step s1_commit: COMMIT;
@@ -186,10 +186,10 @@ a|b
186186
(2 rows)
187187

188188
step s2_rowlocks: SELECT locked_row, multi, modes FROM pgrowlocks('multixact_conflict');
189-
locked_row|multi|modes
190-
----------+-----+--------------------------
191-
(0,1) |t |{"Key Share","For Update"}
192-
(0,2) |t |{"Key Share","For Update"}
189+
locked_row|multi|modes
190+
----------+-----+------------------------------
191+
(0,1) |t |{"ForKey Share","For Update"}
192+
(0,2) |t |{"ForKey Share","For Update"}
193193
(2 rows)
194194

195195
step s1_commit: COMMIT;
@@ -205,10 +205,10 @@ a|b
205205

206206
step s1_updatea: UPDATE multixact_conflict SET a = 10 WHERE a = 1;
207207
step s2_rowlocks: SELECT locked_row, multi, modes FROM pgrowlocks('multixact_conflict');
208-
locked_row|multi|modes
209-
----------+-----+--------------------
210-
(0,1) |t |{"Key Share",Update}
211-
(0,2) |f |{"For Key Share"}
208+
locked_row|multi|modes
209+
----------+-----+------------------------
210+
(0,1) |t |{"ForKey Share",Update}
211+
(0,2) |f |{"For Key Share"}
212212
(2 rows)
213213

214214
step s1_commit: COMMIT;
@@ -224,10 +224,10 @@ a|b
224224

225225
step s1_updateb: UPDATE multixact_conflict SET b = 11 WHERE b = 4;
226226
step s2_rowlocks: SELECT locked_row, multi, modes FROM pgrowlocks('multixact_conflict');
227-
locked_row|multi|modes
228-
----------+-----+-----------------------------
229-
(0,1) |f |{"For Key Share"}
230-
(0,2) |t |{"Key Share","No Key Update"}
227+
locked_row|multi|modes
228+
----------+-----+---------------------------------
229+
(0,1) |f |{"For Key Share"}
230+
(0,2) |t |{"ForKey Share","No Key Update"}
231231
(2 rows)
232232

233233
step s1_commit: COMMIT;

‎contrib/pgrowlocks/pgrowlocks.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ pgrowlocks(PG_FUNCTION_ARGS)
200200
snprintf(buf,NCHARS,"For No Key Update");
201201
break;
202202
caseMultiXactStatusForShare:
203-
snprintf(buf,NCHARS,"Share");
203+
snprintf(buf,NCHARS,"ForShare");
204204
break;
205205
caseMultiXactStatusForKeyShare:
206-
snprintf(buf,NCHARS,"Key Share");
206+
snprintf(buf,NCHARS,"ForKey Share");
207207
break;
208208
}
209209
strcat(values[Atnum_modes],buf);

‎doc/src/sgml/pgrowlocks.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pgrowlocks(text) returns setof record
7474
<entry><structfield>modes</structfield></entry>
7575
<entry><type>text[]</type></entry>
7676
<entry>Lock mode of lockers (more than one if multitransaction),
77-
an array of <literal>Key Share</literal>, <literal>Share</literal>,
77+
an array of <literal>ForKey Share</literal>, <literal>ForShare</literal>,
7878
<literal>For No Key Update</literal>, <literal>No Key Update</literal>,
7979
<literal>For Update</literal>, <literal>Update</literal>.</entry>
8080
</row>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp