Commit 08ecdfe7 authored by Amit Kapila's avatar Amit Kapila

Make FSM test portable.

In b0eaa4c5, 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
parent b0eaa4c5
...@@ -35,24 +35,11 @@ ERROR: relation "xxx" does not exist ...@@ -35,24 +35,11 @@ ERROR: relation "xxx" does not exist
SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0)); SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
ERROR: invalid fork name ERROR: invalid fork name
HINT: Valid fork names are "main", "fsm", "vm", and "init". HINT: Valid fork names are "main", "fsm", "vm", and "init".
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 fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
------------------- QUERY PLAN
0: 39 + ------------------------------------------------------------
1: 39 + Function Scan on fsm_page_contents (actual rows=1 loops=1)
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 +
(1 row) (1 row)
SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0); SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
......
...@@ -22,7 +22,8 @@ SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1; ...@@ -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('xxx', 'main', 0));
SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 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); SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment