Skip to content

Commit

Permalink
With PG11 now set as the oldest supported postgres version, add a tes…
Browse files Browse the repository at this point in the history
…t case in the rollback.sql script covering an UPDATE on a partitionned table that moves a row from one partition to another.
  • Loading branch information
beaud76 committed Feb 24, 2023
1 parent b1e4169 commit 4343eb9
Show file tree
Hide file tree
Showing 23 changed files with 1,184 additions and 1,133 deletions.
2 changes: 1 addition & 1 deletion test/11/expected/adm1.out
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ select count(*) from emaj.emaj_rlbk_session;
select count(*) from emaj.emaj_rlbk_plan;
count
-------
138
139
(1 row)

select count(*) from emaj.emaj_rlbk_stat;
Expand Down
12 changes: 6 additions & 6 deletions test/11/expected/adm3.out
Original file line number Diff line number Diff line change
Expand Up @@ -382,17 +382,17 @@ select * from emaj.emaj_logged_rollback_group('myGroup4','Before update');
select col1, col2, col3, emaj_verb, emaj_tuple, emaj_gid from emaj_myschema4.mypartP2_log;
col1 | col2 | col3 | emaj_verb | emaj_tuple | emaj_gid
------+--------------------------------+------+-----------+------------+----------
1 | Initialy stored in partition 2 | 7 | INS | NEW | 17200005
1 | Initialy stored in partition 2 | 7 | DEL | OLD | 17200007
1 | Initialy stored in partition 2 | 7 | INS | NEW | 17200009
1 | Initialy stored in partition 2 | 8 | INS | NEW | 17200005
1 | Initialy stored in partition 2 | 8 | DEL | OLD | 17200007
1 | Initialy stored in partition 2 | 8 | INS | NEW | 17200009
(3 rows)

select col1, col2, col3, emaj_verb, emaj_tuple, emaj_gid from emaj_myschema4.mypartP3_log;
col1 | col2 | col3 | emaj_verb | emaj_tuple | emaj_gid
------+--------------------------------+------+-----------+------------+----------
11 | Stored in partition 3 | 8 | INS | NEW | 17200006
12 | Initialy stored in partition 2 | 7 | INS | NEW | 17200008
12 | Initialy stored in partition 2 | 7 | DEL | OLD | 17200010
11 | Stored in partition 3 | 9 | INS | NEW | 17200006
12 | Initialy stored in partition 2 | 8 | INS | NEW | 17200008
12 | Initialy stored in partition 2 | 8 | DEL | OLD | 17200010
(3 rows)

select emaj.emaj_stop_group('myGroup4');
Expand Down
8 changes: 4 additions & 4 deletions test/11/expected/check.out
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ select funcname, calls from pg_stat_user_functions
_create_tbl | 161
_dblink_close_cnx | 71
_dblink_open_cnx | 88
_dblink_sql_exec | 1961
_dblink_sql_exec | 1963
_delete_before_mark_group | 23
_delete_between_marks_group | 14
_delete_intermediate_mark_group | 23
Expand All @@ -128,7 +128,7 @@ select funcname, calls from pg_stat_user_functions
_drop_tbl | 210
_emaj_param_change_fnct | 42
_enable_event_triggers | 307
_estimate_rlbk_step_duration | 934
_estimate_rlbk_step_duration | 935
_estimate_rollback_groups | 13
_event_trigger_sql_drop_fnct | 168
_event_trigger_table_rewrite_fnct | 4
Expand Down Expand Up @@ -171,9 +171,9 @@ select funcname, calls from pg_stat_user_functions
_rlbk_seq | 181
_rlbk_session_exec | 84
_rlbk_session_lock | 84
_rlbk_set_batch_number | 167
_rlbk_set_batch_number | 168
_rlbk_start_mark | 80
_rlbk_tbl | 141
_rlbk_tbl | 142
_rollback_activity | 17
_set_mark_groups | 354
_set_time_stamp | 565
Expand Down
438 changes: 224 additions & 214 deletions test/11/expected/rollback.out

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/12/expected/adm1.out
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ select count(*) from emaj.emaj_rlbk_session;
select count(*) from emaj.emaj_rlbk_plan;
count
-------
138
139
(1 row)

select count(*) from emaj.emaj_rlbk_stat;
Expand Down
12 changes: 6 additions & 6 deletions test/12/expected/adm3.out
Original file line number Diff line number Diff line change
Expand Up @@ -383,17 +383,17 @@ select * from emaj.emaj_logged_rollback_group('myGroup4','Before update');
select col1, col2, col3, emaj_verb, emaj_tuple, emaj_gid from emaj_myschema4.mypartP2_log;
col1 | col2 | col3 | emaj_verb | emaj_tuple | emaj_gid
------+--------------------------------+------+-----------+------------+----------
1 | Initialy stored in partition 2 | 7 | INS | NEW | 17200005
1 | Initialy stored in partition 2 | 7 | DEL | OLD | 17200007
1 | Initialy stored in partition 2 | 7 | INS | NEW | 17200009
1 | Initialy stored in partition 2 | 8 | INS | NEW | 17200005
1 | Initialy stored in partition 2 | 8 | DEL | OLD | 17200007
1 | Initialy stored in partition 2 | 8 | INS | NEW | 17200009
(3 rows)

select col1, col2, col3, emaj_verb, emaj_tuple, emaj_gid from emaj_myschema4.mypartP3_log;
col1 | col2 | col3 | emaj_verb | emaj_tuple | emaj_gid
------+--------------------------------+------+-----------+------------+----------
11 | Stored in partition 3 | 8 | INS | NEW | 17200006
12 | Initialy stored in partition 2 | 7 | INS | NEW | 17200008
12 | Initialy stored in partition 2 | 7 | DEL | OLD | 17200010
11 | Stored in partition 3 | 9 | INS | NEW | 17200006
12 | Initialy stored in partition 2 | 8 | INS | NEW | 17200008
12 | Initialy stored in partition 2 | 8 | DEL | OLD | 17200010
(3 rows)

select emaj.emaj_stop_group('myGroup4');
Expand Down
8 changes: 4 additions & 4 deletions test/12/expected/check.out
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ select funcname, calls from pg_stat_user_functions
_create_tbl | 163
_dblink_close_cnx | 71
_dblink_open_cnx | 88
_dblink_sql_exec | 1961
_dblink_sql_exec | 1963
_delete_before_mark_group | 23
_delete_between_marks_group | 14
_delete_intermediate_mark_group | 23
Expand All @@ -128,7 +128,7 @@ select funcname, calls from pg_stat_user_functions
_drop_tbl | 212
_emaj_param_change_fnct | 42
_enable_event_triggers | 311
_estimate_rlbk_step_duration | 934
_estimate_rlbk_step_duration | 935
_estimate_rollback_groups | 13
_event_trigger_sql_drop_fnct | 168
_event_trigger_table_rewrite_fnct | 4
Expand Down Expand Up @@ -171,9 +171,9 @@ select funcname, calls from pg_stat_user_functions
_rlbk_seq | 181
_rlbk_session_exec | 84
_rlbk_session_lock | 84
_rlbk_set_batch_number | 167
_rlbk_set_batch_number | 168
_rlbk_start_mark | 80
_rlbk_tbl | 141
_rlbk_tbl | 142
_rollback_activity | 17
_set_mark_groups | 354
_set_time_stamp | 569
Expand Down

0 comments on commit 4343eb9

Please sign in to comment.