Servers are filled with write caches you need to be aware of:
- Operating system write cache: This cache can easily be gigabytes in size. Typically, you can flush data out of this cache by forcing a sync operation on the block that needs to be stored on disk. On POSIX systems (which includes all UNIX-like ones), this is done with the fsync or fdatasync calls. In some cases, it's possible to write directly in a sync mode, which is effectively a write followed by fsync. The postgresql.conf setting, wal_sync_method , controls which method is used and it's possible to disable this altogether to optimize for speed instead of safety.
- Disk controller write cache: You'll find a write cache on most RAID controller cards, ...