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

Appearance settings

Commit 15d5d74

Browse filesBrowse files
committed
pgrowlocks: change lock mode output labels for consistency
Change "Share" to "For Share" and "Key Share" to "For Key Share" for consistency with other lock mode labels. BACKWARD COMPATIBILITY BREAK Reported-by: David Cook Discussion: https://postgr.es/m/CA+dNBPNBf+FCEwohe7SH1tSks0R_G4F=tuvM=hnPs4qWiAH8vg@mail.gmail.com Backpatch-through: master
1 parent 1b5a004 commit 15d5d74
Copy full SHA for 15d5d74

File tree

Expand file treeCollapse file tree

3 files changed

+23
-23
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+23
-23
lines changed

‎contrib/pgrowlocks/expected/pgrowlocks.out

Copy file name to clipboardExpand all lines: contrib/pgrowlocks/expected/pgrowlocks.out
+20-20Lines 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 |{"For Key Share","For Share"}
142+
(0,2) |t |{"For Key Share","For Share"}
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 |{"For Key Share","For No Key Update"}
167+
(0,2) |t |{"For Key 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 |{"For Key Share","For Update"}
192+
(0,2) |t |{"For Key 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 |{"For Key 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 |{"For Key Share","No Key Update"}
231231
(2 rows)
232232

233233
step s1_commit: COMMIT;

‎contrib/pgrowlocks/pgrowlocks.c

Copy file name to clipboardExpand all lines: contrib/pgrowlocks/pgrowlocks.c
+2-2Lines 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
case MultiXactStatusForShare:
203-
snprintf(buf, NCHARS, "Share");
203+
snprintf(buf, NCHARS, "For Share");
204204
break;
205205
case MultiXactStatusForKeyShare:
206-
snprintf(buf, NCHARS, "Key Share");
206+
snprintf(buf, NCHARS, "For Key Share");
207207
break;
208208
}
209209
strcat(values[Atnum_modes], buf);

‎doc/src/sgml/pgrowlocks.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/pgrowlocks.sgml
+1-1Lines 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>For Key Share</literal>, <literal>For Share</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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.