File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -3696,13 +3696,14 @@ is_basebackuped(MtmConfig *mtm_cfg)
3696
3696
}
3697
3697
CommitTransactionCommand ();
3698
3698
3699
- if (n_missing_slots == 0 )
3700
- return false;
3701
- else if (n_missing_slots == mtm_cfg -> n_nodes - 1 ) /* n_nodes includes me */
3702
- return true;
3703
- else
3704
- mtm_log (ERROR , "Missing %d replication slots out of %d" ,
3705
- n_missing_slots , mtm_cfg -> n_nodes );
3699
+ /*
3700
+ * XXX: we will be confused here if user accidently drops mm slot, it
3701
+ * would be nicer to have more accurate detector. Note that we can't check
3702
+ * 'n_missing_slots == n_nodes - 1' because 1) new node still doesn't know
3703
+ * its id; 2) it itself might or might not be initialized at donor on the
3704
+ * moment of backup.
3705
+ */
3706
+ return n_missing_slots != 0 ;
3706
3707
}
3707
3708
3708
3709
static void
Original file line number Diff line number Diff line change 101
101
{
102
102
$cluster -> pgbench(0, (' -N' , ' -n' , -t => ' 100' ) );
103
103
}
104
- # ensure monitor creates slot for new node on donor which will be used by
105
- # basebackup before proceeding
104
+ # Ensure monitor creates slot for new node on donor. We don't use it for
105
+ # basebackup anymore, but this is still a good idea (it would be even better to
106
+ # wait for logical slot creation too).
106
107
$cluster -> poll_query_until(0, " select exists(select * from pg_replication_slots where slot_name = 'mtm_filter_slot_${new_node_id} ');" )
107
108
or croak " timed out waiting for slot creation" ;
108
109
my $end_lsn = $cluster -> backup_and_init(0, $new_node_off , $new_node_id );
You can’t perform that action at this time.
0 commit comments