diff options
author | Bruce Momjian <bruce@momjian.us> | 2023-09-26 17:41:48 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2023-09-26 17:41:48 -0400 |
commit | 15d5d7405d3591aeba418b20c5ac75e80ddc8c74 (patch) | |
tree | d447929a9d1ff2ca6119dee0681524e29d8609f2 | |
parent | 1b5a00450acb34d4aa4565aa54fe79c6676f8236 (diff) | |
download | postgresql-15d5d7405d3591aeba418b20c5ac75e80ddc8c74.tar.gz postgresql-15d5d7405d3591aeba418b20c5ac75e80ddc8c74.zip |
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
-rw-r--r-- | contrib/pgrowlocks/expected/pgrowlocks.out | 40 | ||||
-rw-r--r-- | contrib/pgrowlocks/pgrowlocks.c | 4 | ||||
-rw-r--r-- | doc/src/sgml/pgrowlocks.sgml | 2 |
3 files changed, 23 insertions, 23 deletions
diff --git a/contrib/pgrowlocks/expected/pgrowlocks.out b/contrib/pgrowlocks/expected/pgrowlocks.out index 725467266a4..77431bfe189 100644 --- a/contrib/pgrowlocks/expected/pgrowlocks.out +++ b/contrib/pgrowlocks/expected/pgrowlocks.out @@ -136,10 +136,10 @@ a|b (2 rows) step s2_rowlocks: SELECT locked_row, multi, modes FROM pgrowlocks('multixact_conflict'); -locked_row|multi|modes -----------+-----+------------------- -(0,1) |t |{"Key Share",Share} -(0,2) |t |{"Key Share",Share} +locked_row|multi|modes +----------+-----+----------------------------- +(0,1) |t |{"For Key Share","For Share"} +(0,2) |t |{"For Key Share","For Share"} (2 rows) step s1_commit: COMMIT; @@ -161,10 +161,10 @@ a|b (2 rows) step s2_rowlocks: SELECT locked_row, multi, modes FROM pgrowlocks('multixact_conflict'); -locked_row|multi|modes -----------+-----+--------------------------------- -(0,1) |t |{"Key Share","For No Key Update"} -(0,2) |t |{"Key Share","For No Key Update"} +locked_row|multi|modes +----------+-----+------------------------------------- +(0,1) |t |{"For Key Share","For No Key Update"} +(0,2) |t |{"For Key Share","For No Key Update"} (2 rows) step s1_commit: COMMIT; @@ -186,10 +186,10 @@ a|b (2 rows) step s2_rowlocks: SELECT locked_row, multi, modes FROM pgrowlocks('multixact_conflict'); -locked_row|multi|modes -----------+-----+-------------------------- -(0,1) |t |{"Key Share","For Update"} -(0,2) |t |{"Key Share","For Update"} +locked_row|multi|modes +----------+-----+------------------------------ +(0,1) |t |{"For Key Share","For Update"} +(0,2) |t |{"For Key Share","For Update"} (2 rows) step s1_commit: COMMIT; @@ -205,10 +205,10 @@ a|b step s1_updatea: UPDATE multixact_conflict SET a = 10 WHERE a = 1; step s2_rowlocks: SELECT locked_row, multi, modes FROM pgrowlocks('multixact_conflict'); -locked_row|multi|modes -----------+-----+-------------------- -(0,1) |t |{"Key Share",Update} -(0,2) |f |{"For Key Share"} +locked_row|multi|modes +----------+-----+------------------------ +(0,1) |t |{"For Key Share",Update} +(0,2) |f |{"For Key Share"} (2 rows) step s1_commit: COMMIT; @@ -224,10 +224,10 @@ a|b step s1_updateb: UPDATE multixact_conflict SET b = 11 WHERE b = 4; step s2_rowlocks: SELECT locked_row, multi, modes FROM pgrowlocks('multixact_conflict'); -locked_row|multi|modes -----------+-----+----------------------------- -(0,1) |f |{"For Key Share"} -(0,2) |t |{"Key Share","No Key Update"} +locked_row|multi|modes +----------+-----+--------------------------------- +(0,1) |f |{"For Key Share"} +(0,2) |t |{"For Key Share","No Key Update"} (2 rows) step s1_commit: COMMIT; diff --git a/contrib/pgrowlocks/pgrowlocks.c b/contrib/pgrowlocks/pgrowlocks.c index c543277b7c5..a04e187ec43 100644 --- a/contrib/pgrowlocks/pgrowlocks.c +++ b/contrib/pgrowlocks/pgrowlocks.c @@ -200,10 +200,10 @@ pgrowlocks(PG_FUNCTION_ARGS) snprintf(buf, NCHARS, "For No Key Update"); break; case MultiXactStatusForShare: - snprintf(buf, NCHARS, "Share"); + snprintf(buf, NCHARS, "For Share"); break; case MultiXactStatusForKeyShare: - snprintf(buf, NCHARS, "Key Share"); + snprintf(buf, NCHARS, "For Key Share"); break; } strcat(values[Atnum_modes], buf); diff --git a/doc/src/sgml/pgrowlocks.sgml b/doc/src/sgml/pgrowlocks.sgml index b5e655735a1..9c6e86b27ed 100644 --- a/doc/src/sgml/pgrowlocks.sgml +++ b/doc/src/sgml/pgrowlocks.sgml @@ -74,7 +74,7 @@ pgrowlocks(text) returns setof record <entry><structfield>modes</structfield></entry> <entry><type>text[]</type></entry> <entry>Lock mode of lockers (more than one if multitransaction), - an array of <literal>Key Share</literal>, <literal>Share</literal>, + an array of <literal>For Key Share</literal>, <literal>For Share</literal>, <literal>For No Key Update</literal>, <literal>No Key Update</literal>, <literal>For Update</literal>, <literal>Update</literal>.</entry> </row> |