Toggle navigation

data_sync_retry

类型: bool
默认: off
上下文: postmaster
重新开始: true
以来: 9.4

When set to false, which is the default, PostgreSQL will raise a PANIC-level error on failure to flush modified data files to the filesystem. This causes the database server to crash. 当设置为false(默认值),PostgreSQL 把修改的数据文件刷新到文件系统失败,将引发PANIC级错误。 这会导致数据库服务器崩溃。

On some operating systems, the status of data in the kernel's page cache is unknown after a write-back failure. In some cases it might have been entirely forgotten, making it unsafe to retry; the second attempt may be reported as successful, when in fact the data has been lost. In these circumstances, the only way to avoid data loss is to recover from the WAL after any failure is reported, preferably after investigating the root cause of the failure and replacing any faulty hardware.

If set to true, PostgreSQL will instead report an error but continue to run so that the data flushing operation can be retried in a later checkpoint. Only set it to true after investigating the operating system's treatment of buffered data in case of write-back failure.

条评论