PG17 compatibility: ensure get_progress() output is consistent

in regress test isolation_progress_monitoring by adding an ORDER BY
clause. The implementation of get_progress() uses a tuplestore to hold
the step and progress values, and tuplestore does not provide any
guarantee on the ordering of the tuples so applying ORDER BY ensures
stable test output. Also make the output more user friendly by including
the column names.
pull/7793/head
Colm McHugh 2024-12-19 14:43:41 +00:00
parent a0cd8bd37b
commit a5ed5106a4
2 changed files with 32 additions and 32 deletions

View File

@ -70,21 +70,21 @@ step s3-start-operation:
SELECT sample_operation(3778, 30, 9);
<waiting ...>
step show-progress:
SELECT show_progress(1337);
SELECT show_progress(3778);
SELECT step, progress FROM show_progress(1337) ORDER BY 1, 2;
SELECT step, progress FROM show_progress(3778) ORDER BY 1, 2;
show_progress
step|progress
---------------------------------------------------------------------
(0,0)
(1,0)
(0,0)
(1,0)
0| 0
0| 0
1| 0
1| 0
(4 rows)
show_progress
step|progress
---------------------------------------------------------------------
(0,0)
(1,0)
0| 0
1| 0
(2 rows)
step release-locks-1:
@ -109,21 +109,21 @@ t
(1 row)
step show-progress:
SELECT show_progress(1337);
SELECT show_progress(3778);
SELECT step, progress FROM show_progress(1337) ORDER BY 1, 2;
SELECT step, progress FROM show_progress(3778) ORDER BY 1, 2;
show_progress
step|progress
---------------------------------------------------------------------
(0,-1)
(1,0)
(0,2)
(1,0)
0| -1
0| 2
1| 0
1| 0
(4 rows)
show_progress
step|progress
---------------------------------------------------------------------
(0,9)
(1,0)
0| 9
1| 0
(2 rows)
step release-locks-2:
@ -148,21 +148,21 @@ t
(1 row)
step show-progress:
SELECT show_progress(1337);
SELECT show_progress(3778);
SELECT step, progress FROM show_progress(1337) ORDER BY 1, 2;
SELECT step, progress FROM show_progress(3778) ORDER BY 1, 2;
show_progress
step|progress
---------------------------------------------------------------------
(0,-1)
(1,-1)
(0,2)
(1,2)
0| -1
0| 2
1| -1
1| 2
(4 rows)
show_progress
step|progress
---------------------------------------------------------------------
(0,9)
(1,9)
0| 9
1| 9
(2 rows)
step release-locks-3:

View File

@ -126,8 +126,8 @@ session "monitor"
step "show-progress"
{
SELECT show_progress(1337);
SELECT show_progress(3778);
SELECT step, progress FROM show_progress(1337) ORDER BY 1, 2;
SELECT step, progress FROM show_progress(3778) ORDER BY 1, 2;
}
permutation "take-locks" "s1-start-operation" "s2-start-operation" "s3-start-operation" "show-progress" "release-locks-1" "show-progress" "release-locks-2" "show-progress" "release-locks-3"