postgrespro/pg_variables

Test failed on sparc

ziva777 opened this issue · 1 comments

diff -U3 /bf/PGPRO12_DEV/pgsql.build/contrib/pg_variables/expected/pg_variables_trans.out /bf/PGPRO12_DEV/pgsql.build/contrib/pg_variables/results/pg_variables_trans.out
--- /bf/PGPRO12_DEV/pgsql.build/contrib/pg_variables/expected/pg_variables_trans.out	Fri Dec  4 04:15:41 2020
+++ /bf/PGPRO12_DEV/pgsql.build/contrib/pg_variables/results/pg_variables_trans.out	Fri Dec  4 04:48:38 2020
@@ -3555,15 +3555,15 @@
 DECLARE r1_cur CURSOR FOR SELECT pgv_stats();
 DECLARE r2_cur CURSOR FOR SELECT pgv_stats();
 FETCH 1 in r1_cur;
-  pgv_stats   
---------------
- (test,32768)
+   pgv_stats   
+---------------
+ (test1,49152)
 (1 row)
 
 FETCH 1 in r2_cur;
-  pgv_stats   
---------------
- (test,32768)
+   pgv_stats   
+---------------
+ (test1,49152)
 (1 row)
 
 COMMIT;
@@ -3573,15 +3573,15 @@
 DECLARE r1_cur CURSOR FOR SELECT pgv_stats();
 DECLARE r2_cur CURSOR FOR SELECT pgv_stats();
 FETCH 1 in r1_cur;
-  pgv_stats   
---------------
- (test,32768)
+   pgv_stats   
+---------------
+ (test1,49152)
 (1 row)
 
 FETCH 1 in r2_cur;
-  pgv_stats   
---------------
- (test,32768)
+   pgv_stats   
+---------------
+ (test1,49152)
 (1 row)
 
 ROLLBACK;
@@ -3595,15 +3595,15 @@
 DECLARE r1_cur CURSOR FOR SELECT pgv_stats();
 DECLARE r2_cur CURSOR FOR SELECT pgv_stats();
 FETCH 1 in r1_cur;
-  pgv_stats   
---------------
- (test,32768)
+   pgv_stats   
+---------------
+ (test1,65536)
 (1 row)
 
 FETCH 1 in r2_cur;
-  pgv_stats   
---------------
- (test,32768)
+   pgv_stats   
+---------------
+ (test1,65536)
 (1 row)
 
 COMMIT;
@@ -3613,15 +3613,15 @@
 DECLARE r1_cur CURSOR FOR SELECT pgv_stats();
 DECLARE r2_cur CURSOR FOR SELECT pgv_stats();
 FETCH 1 in r1_cur;
-  pgv_stats   
---------------
- (test,32768)
+   pgv_stats   
+---------------
+ (test1,65536)
 (1 row)
 
 FETCH 1 in r2_cur;
-  pgv_stats   
---------------
- (test,32768)
+   pgv_stats   
+---------------
+ (test1,65536)
 (1 row)
 
 ROLLBACK;```

The problem seems to be in a default sort order for the pgv_stats call. So adding a sort order will solve this problem.

Also remove the multiple output of the pg_variables_trans test caused by calling pgv_stats in different versions of pg. This test is not intended to verify the exact values returned by the pgv_stats call, so it is sufficient to check if the values are multiples of 8k.