Disable disk caches in AWS EBS for PostgreSQL?

Posted by Alexandr Kurilin on Server Fault See other posts from Server Fault or by Alexandr Kurilin
Published on 2013-07-01T22:00:46Z Indexed on 2013/07/01 23:07 UTC
Read the original article Hit count: 301

It's my understanding that, without correctly disabling OS-level and drive-level caching, there is a chance that in case of system failure the Write-Ahead Log might not be saved correctly and in fact might get corrupted, possibly preventing data recovery.

I've already made sure that

wal_sync_method=fdatasync

however I was unable to make any configuration changes with hdparm since I get the following:

$ sudo htparm -I /dev/xvdf

/dev/xvdf:
 HDIO_DRIVE_CMD(identify) failed: Invalid argument

Looks like that option is not available in the kind of setup you get in EC2.

Am I missing anything here? Are there any other obvious caches I have to disable to ensure the WAL's safety?

© Server Fault or respective owner

Related posts about ubuntu

Related posts about amazon-ec2