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

Commit8f11d5b

Browse files
authored
Merge pull request#35 from postgrespro/master
Merge fix for test on sparc (Issue#33)
2 parents2c47f47 +992db9f commit8f11d5b

File tree

4 files changed

+113
-7618
lines changed

4 files changed

+113
-7618
lines changed

‎expected/pg_variables_trans.out

Lines changed: 83 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -3539,6 +3539,16 @@ COMMIT;
35393539
---
35403540
--- Test cases for pgv_stats
35413541
---
3542+
--- Amount of allocated memory may vary from version to version, as well as from
3543+
--- platform to platform. Moreover, postgres versions less than 90600 always
3544+
--- show zero allocated memory. So, it's much easier to check if allocated
3545+
--- memory size is multiple of 8k since we use ALLOCSET_DEFAULT_INITSIZE
3546+
--- (see memutils.h), insted of creating multiple outputs files.
3547+
---
3548+
CREATE TEMP VIEW pgv_stats_view(pack, mem_mult) AS
3549+
SELECT package, allocated_memory % 8192 as allocated_multiple_8192
3550+
FROM pgv_stats()
3551+
ORDER BY 1;
35423552
SELECT pgv_insert('test1', 'y', ROW (2::float, 1::float), TRUE);
35433553
pgv_insert
35443554
------------
@@ -3552,36 +3562,36 @@ SELECT pgv_insert('test1', 'x', ROW (2::float, 1::float), TRUE);
35523562
(1 row)
35533563

35543564
BEGIN;
3555-
DECLARE r1_cur CURSOR FOR SELECTpgv_stats();
3556-
DECLARE r2_cur CURSOR FOR SELECTpgv_stats();
3565+
DECLARE r1_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
3566+
DECLARE r2_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
35573567
FETCH 1 in r1_cur;
3558-
pgv_stats
3559-
--------------
3560-
(test,32768)
3568+
pack | mem_mult
3569+
------+----------
3570+
test | 0
35613571
(1 row)
35623572

35633573
FETCH 1 in r2_cur;
3564-
pgv_stats
3565-
--------------
3566-
(test,32768)
3574+
pack | mem_mult
3575+
------+----------
3576+
test | 0
35673577
(1 row)
35683578

35693579
COMMIT;
35703580
SELECT pgv_insert('test1', 'y', ROW (2::float, 1::float), TRUE);
35713581
ERROR: there is a record in the variable "y" with same key
35723582
BEGIN;
3573-
DECLARE r1_cur CURSOR FOR SELECTpgv_stats();
3574-
DECLARE r2_cur CURSOR FOR SELECTpgv_stats();
3583+
DECLARE r1_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
3584+
DECLARE r2_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
35753585
FETCH 1 in r1_cur;
3576-
pgv_stats
3577-
--------------
3578-
(test,32768)
3586+
pack | mem_mult
3587+
------+----------
3588+
test | 0
35793589
(1 row)
35803590

35813591
FETCH 1 in r2_cur;
3582-
pgv_stats
3583-
--------------
3584-
(test,32768)
3592+
pack | mem_mult
3593+
------+----------
3594+
test | 0
35853595
(1 row)
35863596

35873597
ROLLBACK;
@@ -3592,36 +3602,36 @@ ERROR: variable "y" already created as TRANSACTIONAL
35923602
SELECT pgv_insert('test1', 'x', ROW (2::float, 1::float), FALSE);
35933603
ERROR: variable "x" already created as TRANSACTIONAL
35943604
BEGIN;
3595-
DECLARE r1_cur CURSOR FOR SELECTpgv_stats();
3596-
DECLARE r2_cur CURSOR FOR SELECTpgv_stats();
3605+
DECLARE r1_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
3606+
DECLARE r2_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
35973607
FETCH 1 in r1_cur;
3598-
pgv_stats
3599-
--------------
3600-
(test,32768)
3608+
pack | mem_mult
3609+
------+----------
3610+
test | 0
36013611
(1 row)
36023612

36033613
FETCH 1 in r2_cur;
3604-
pgv_stats
3605-
--------------
3606-
(test,32768)
3614+
pack | mem_mult
3615+
------+----------
3616+
test | 0
36073617
(1 row)
36083618

36093619
COMMIT;
36103620
SELECT pgv_insert('test1', 'y', ROW (2::float, 1::float), FALSE);
36113621
ERROR: variable "y" already created as TRANSACTIONAL
36123622
BEGIN;
3613-
DECLARE r1_cur CURSOR FOR SELECTpgv_stats();
3614-
DECLARE r2_cur CURSOR FOR SELECTpgv_stats();
3623+
DECLARE r1_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
3624+
DECLARE r2_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
36153625
FETCH 1 in r1_cur;
3616-
pgv_stats
3617-
--------------
3618-
(test,32768)
3626+
pack | mem_mult
3627+
------+----------
3628+
test | 0
36193629
(1 row)
36203630

36213631
FETCH 1 in r2_cur;
3622-
pgv_stats
3623-
--------------
3624-
(test,32768)
3632+
pack | mem_mult
3633+
------+----------
3634+
test | 0
36253635
(1 row)
36263636

36273637
ROLLBACK;
@@ -3645,18 +3655,18 @@ SELECT pgv_insert('test', 'x1', ROW (2::float, 1::float), TRUE);
36453655

36463656
(1 row)
36473657

3648-
DECLARE r1_cur CURSOR FOR SELECTpgv_stats();
3649-
DECLARE r2_cur CURSOR FOR SELECTpgv_stats();
3658+
DECLARE r1_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
3659+
DECLARE r2_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
36503660
FETCH 1 in r1_cur;
3651-
pgv_stats
3652-
--------------
3653-
(test,32768)
3661+
pack | mem_mult
3662+
------+----------
3663+
test | 0
36543664
(1 row)
36553665

36563666
FETCH 1 in r2_cur;
3657-
pgv_stats
3658-
--------------
3659-
(test,32768)
3667+
pack | mem_mult
3668+
------+----------
3669+
test | 0
36603670
(1 row)
36613671

36623672
COMMIT;
@@ -3669,18 +3679,18 @@ SELECT pgv_insert('test', 'x2', ROW (2::float, 1::float), TRUE);
36693679
(1 row)
36703680

36713681
SAVEPOINT comm2;
3672-
DECLARE r1_cur CURSOR FOR SELECTpgv_stats();
3673-
DECLARE r2_cur CURSOR FOR SELECTpgv_stats();
3682+
DECLARE r1_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
3683+
DECLARE r2_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
36743684
FETCH 1 in r1_cur;
3675-
pgv_stats
3676-
--------------
3677-
(test,49152)
3685+
pack | mem_mult
3686+
------+----------
3687+
test | 0
36783688
(1 row)
36793689

36803690
FETCH 1 in r2_cur;
3681-
pgv_stats
3682-
--------------
3683-
(test,49152)
3691+
pack | mem_mult
3692+
------+----------
3693+
test | 0
36843694
(1 row)
36853695

36863696
COMMIT;
@@ -3692,19 +3702,19 @@ SELECT pgv_insert('test', 'x3', ROW (2::float, 1::float), TRUE);
36923702

36933703
(1 row)
36943704

3695-
DECLARE r1_cur CURSOR FOR SELECTpgv_stats();
3696-
DECLARE r2_cur CURSOR FOR SELECTpgv_stats();
3705+
DECLARE r1_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
3706+
DECLARE r2_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
36973707
SAVEPOINT comm2;
36983708
FETCH 1 in r1_cur;
3699-
pgv_stats
3700-
--------------
3701-
(test,65536)
3709+
pack | mem_mult
3710+
------+----------
3711+
test | 0
37023712
(1 row)
37033713

37043714
FETCH 1 in r2_cur;
3705-
pgv_stats
3706-
--------------
3707-
(test,65536)
3715+
pack | mem_mult
3716+
------+----------
3717+
test | 0
37083718
(1 row)
37093719

37103720
COMMIT;
@@ -3716,19 +3726,19 @@ SELECT pgv_insert('test', 'x4', ROW (2::float, 1::float), TRUE);
37163726

37173727
(1 row)
37183728

3719-
DECLARE r1_cur CURSOR FOR SELECTpgv_stats();
3720-
DECLARE r2_cur CURSOR FOR SELECTpgv_stats();
3729+
DECLARE r1_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
3730+
DECLARE r2_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
37213731
FETCH 1 in r1_cur;
3722-
pgv_stats
3723-
--------------
3724-
(test,81920)
3732+
pack | mem_mult
3733+
------+----------
3734+
test | 0
37253735
(1 row)
37263736

37273737
SAVEPOINT comm2;
37283738
FETCH 1 in r2_cur;
3729-
pgv_stats
3730-
--------------
3731-
(test,81920)
3739+
pack | mem_mult
3740+
------+----------
3741+
test | 0
37323742
(1 row)
37333743

37343744
COMMIT;
@@ -3740,22 +3750,23 @@ SELECT pgv_insert('test', 'x5', ROW (2::float, 1::float), TRUE);
37403750

37413751
(1 row)
37423752

3743-
DECLARE r1_cur CURSOR FOR SELECTpgv_stats();
3744-
DECLARE r2_cur CURSOR FOR SELECTpgv_stats();
3753+
DECLARE r1_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
3754+
DECLARE r2_cur CURSOR FOR SELECTpack, mem_mult FROM pgv_stats_view;
37453755
FETCH 1 in r1_cur;
3746-
pgv_stats
3747-
--------------
3748-
(test,98304)
3756+
pack | mem_mult
3757+
------+----------
3758+
test | 0
37493759
(1 row)
37503760

37513761
FETCH 1 in r2_cur;
3752-
pgv_stats
3753-
--------------
3754-
(test,98304)
3762+
pack | mem_mult
3763+
------+----------
3764+
test | 0
37553765
(1 row)
37563766

37573767
SAVEPOINT comm2;
37583768
COMMIT;
3769+
DROP VIEW pgv_stats_view;
37593770
SELECT pgv_free();
37603771
pgv_free
37613772
----------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp