git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b0eaa4c)
Make FSM test portable.
Mon, 4 Feb 2019 04:38:29 +0000 (10:08 +0530)
Mon, 4 Feb 2019 04:38:29 +0000 (10:08 +0530)
In b0eaa4c51b, we allow FSM to be created only after 4 pages. One of the
tests check the FSM contents and to do that it populates many tuples in
the relation. The FSM contents depend on the availability of freespace in
the page and it could vary because of the alignment of tuples.

This commit removes the dependency on FSM contents.

Author: Amit Kapila
Discussion: https://postgr.es/m/CAA4eK1KADF6K1bagr0--mGv3dMcZ%3DH_Z-Qtvdfbp5PjaC6PJJA%40mail.gmail.com


diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 89b73ca9917c15294b755a3ca2a015fab3fe2bed..74454801f5c5c2c4f34b3486754f6abec2561fa7 100644 (file)
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -35,24 +35,11 @@ ERROR: relation "xxx" does not exist
SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
ERROR: invalid fork name
HINT: Valid fork names are "main", "fsm", "vm", and "init".
-SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
- fsm_page_contents
--------------------
- 0: 39 +
- 1: 39 +
- 3: 39 +
- 7: 39 +
- 15: 39 +
- 31: 39 +
- 63: 39 +
- 127: 39 +
- 255: 39 +
- 511: 39 +
- 1023: 39 +
- 2047: 39 +
- 4095: 39 +
- fp_next_slot: 0 +
-
+EXPLAIN (costs off, analyze on, timing off, summary off) SELECT * FROM
+ fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ QUERY PLAN
+------------------------------------------------------------
+ Function Scan on fsm_page_contents (actual rows=1 loops=1)
(1 row)
SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 67166ef54c44d04430f1b644719f3602afed1c42..e88598a48e735f83ca58b50c0f18fb60aa43af3e 100644 (file)
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -22,7 +22,8 @@ SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
SELECT octet_length(get_raw_page('xxx', 'main', 0));
SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
-SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+EXPLAIN (costs off, analyze on, timing off, summary off) SELECT * FROM
+ fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /