During sync, massive-sync conditions (dropped indexes, FKs, tables switched to...
Summary
Added a block count threshold for massive-sync optimizations. When syncing, the massive-sync conditions (dropped indexes, foreign keys disabled, tables switched to UNLOGGED mode) are now only applied if the number of blocks to be synced exceeds a specified limit.
This prevents unnecessary index drops and table mode switches for small sync operations where the overhead of rebuilding indexes would outweigh the sync speed benefits.
Edited by Dan Notestein