Answer the question
In order to leave comments, you need to log in
DB transactions and write to disk?
A quote about one of the InnoDB settings:
innodb_flush_log_at_trx_commit - has three valid values: 0, 1, 2. With a value of 0, the log is flushed to disk once per second, regardless of ongoing transactions. If set to 1, the log is flushed to disk on every transaction. With a value of 2, the log is written with each transaction, but is never flushed to disk, leaving it to the conscience of the OS. The default is 1, which is the most reliable setting, but not the fastest. In general, you can safely use 2, data can be lost only in the event of an OS crash and only in a few seconds (depending on OS settings). 0 is the fastest mode, but data can be lost both when the OS crashes and when the MySQL server itself crashes (however, data is only for 1-2 seconds).
Question: Does this mean that with values of 0 and 2 in the event of a crash, I will lose the transaction, or even with these settings, it will roll back if it crashes? And i.e. if I want guaranteed true transactions, then I need to set only 1?
Answer the question
In order to leave comments, you need to log in
if I want guaranteed true transactions, then I need to set only 1?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question