Skip to content

Commit

Permalink
Fix singlenode mode isolation2 expected results not stable.
Browse files Browse the repository at this point in the history
As there are three ao/aocs tables in the prevent_ao_wal isolation2 test, the
expected results of wal are not stable after VACUUM. We fix this by truncate
unrelated table in lockmodes test.

Authored-by: Zhang Wenchao zwcpostgres@gmail.com
  • Loading branch information
wenchaozhang-123 committed Jul 11, 2024
1 parent 91e8155 commit 89fb4d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/test/regress/expected/misc_sanity_external_fts.out
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ ORDER BY 1, 2;
pg_resqueuecapability | ressetting | text
pg_stat_last_operation | stasubtype | text
pg_stat_last_shoperation | stasubtype | text
pg_tag | allowed_values | text[]
pg_tag_description | tagvalue | text
pg_task | command | text
pg_task | database | text
pg_task | jobname | text
Expand All @@ -133,7 +135,7 @@ ORDER BY 1, 2;
pg_task_run_history | return_message | text
pg_task_run_history | status | text
pg_task_run_history | username | text
(31 rows)
(33 rows)

-- system catalogs without primary keys
--
Expand Down
3 changes: 3 additions & 0 deletions src/test/singlenode_isolation2/expected/lockmodes.out
Original file line number Diff line number Diff line change
Expand Up @@ -1089,3 +1089,6 @@ UPDATE 1
1: ROLLBACK;
ROLLBACK
1q: ... <quitting>

TRUNCATE t_lockmods_ao;
TRUNCATE
2 changes: 0 additions & 2 deletions src/test/singlenode_isolation2/expected/prevent_ao_wal.out
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ rmgr: Appendonly len (rec/tot): 146/ 146, tx: 12664, lsn: 0/F8000B38,
rmgr: Appendonly len (rec/tot): 58/ 58, tx: 12665, lsn: 0/F8000C98, prev 0/F8000C68, desc: APPENDONLY_TRUNCATE truncate: rel 1663/221728/180472 seg/offset:0/0
rmgr: Appendonly len (rec/tot): 58/ 58, tx: 0, lsn: 0/F80412F8, prev 0/F80412C8, desc: APPENDONLY_TRUNCATE truncate: rel 1663/221728/180476 seg/offset:0/80
rmgr: Appendonly len (rec/tot): 58/ 58, tx: 0, lsn: 0/F8041338, prev 0/F80412F8, desc: APPENDONLY_TRUNCATE truncate: rel 1663/221728/180476 seg/offset:128/80
rmgr: Appendonly len (rec/tot): 58/ 58, tx: 0, lsn: 0/F80D2020, prev 0/F80D1FF0, desc: APPENDONLY_TRUNCATE truncate: rel 1663/221728/180445 seg/offset:0/112
rmgr: Appendonly len (rec/tot): 58/ 58, tx: 0, lsn: 0/F8307118, prev 0/F83070E8, desc: APPENDONLY_TRUNCATE truncate: rel 1663/221728/180472 seg/offset:1/88
rmgr: Appendonly len (rec/tot): 58/ 58, tx: 0, lsn: 0/F8307158, prev 0/F8307118, desc: APPENDONLY_TRUNCATE truncate: rel 1663/221728/180472 seg/offset:0/0
rmgr: Appendonly len (rec/tot): 58/ 58, tx: 0, lsn: 0/F8307208, prev 0/F83071D8, desc: APPENDONLY_TRUNCATE truncate: rel 1663/221728/180476 seg/offset:0/80
Expand All @@ -86,7 +85,6 @@ rmgr: Appendonly len (rec/tot): 122/ 122, tx: 12673, lsn: 0/F83075A0,
rmgr: Appendonly len (rec/tot): 122/ 122, tx: 12673, lsn: 0/F8307620, prev 0/F83075A0, desc: APPENDONLY_INSERT insert: rel 1663/221728/180476 seg/offset:129/0 len:64
rmgr: Appendonly len (rec/tot): 58/ 58, tx: 12674, lsn: 0/F8307780, prev 0/F8307750, desc: APPENDONLY_TRUNCATE truncate: rel 1663/221728/180476 seg/offset:0/0
rmgr: Appendonly len (rec/tot): 58/ 58, tx: 12674, lsn: 0/F83077C0, prev 0/F8307780, desc: APPENDONLY_TRUNCATE truncate: rel 1663/221728/180476 seg/offset:128/0
rmgr: Appendonly len (rec/tot): 58/ 58, tx: 0, lsn: 0/F8327BF0, prev 0/F8327BC0, desc: APPENDONLY_TRUNCATE truncate: rel 1663/221728/180445 seg/offset:0/112


-- *********** Set wal_level=minimal **************
Expand Down
2 changes: 2 additions & 0 deletions src/test/singlenode_isolation2/sql/lockmodes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -381,3 +381,5 @@ create table t_lockmods_ao1 (c int) with (appendonly=true);
1: select * from show_locks_lockmodes;
1: ROLLBACK;
1q:

TRUNCATE t_lockmods_ao;

0 comments on commit 89fb4d5

Please sign in to comment.