Home > database >  Does turning off fsync in PostgreSQL can corrupt all the database or only the specific table I'
Does turning off fsync in PostgreSQL can corrupt all the database or only the specific table I'

Time:11-04

I'm working with PostgreSQL and I read a lot about the unrecommended option of disabling fsync (fsync = off).
However, it was not clear to me if disabling the fsync option may corrupt all the database or only the specific table I'm working with.

Does anyone here can share from his experience or share an official link that's clarify this issue?

Thanks in advance,
Joseph

CodePudding user response:

fsync is required to persist data to disk:

  • the WAL (transaction log), so that committed transactions are on disk and no data modification takes place before it is logged in WAL

  • the data files during a checkpoint

Both WAL and checkpoints are cluster-wide concepts, so your whole cluster will be broken after a crash with fsync disabled.

Don't touch that dial!

  • Related