The invention relates to the field of databases, in particular to a
database disaster tolerance synchronization method based on packet replication and a
database system. The invention provides a refined synchronization control
mechanism based on a grouping strategy aiming at the problem that a unified global synchronization strategy cannot meet refined and differentiated requirements of distributed applications on
data consistency, availability and performance in the existing
database replication technology. Multiple groups of standby libraries adopt different synchronization levels to perform grouping
copying in the same database; a logic
abstraction layer of a synchronization group is introduced, a synchronization strategy and a physical standby
library are decoupled, and multiple different synchronization mechanisms of a master-slave
replication process are allowed in a database; a synchronous waiting mode of a traditional single path is broken through by utilizing a multi-waiting
queue and a grouping ACK
processing mechanism, so that state advancement of different groups does not interfere with each other; and checking is completed based on the consistency of the state
mask, so that the transaction can be successfully returned only after all specified synchronization conditions are met, and the strong consistency of data is ensured.