![]() Next, there might be a cache in the disk drive controller this is particularly common on RAID controller cards. ![]() (See the wal_sync_method parameter to adjust how this is done.) ![]() ![]() Fortunately, all operating systems give applications a way to force writes from the buffer cache to disk, and PostgreSQL uses those features. First, there is the operating system's buffer cache, which caches frequently requested disk blocks and combines disk writes. Because disk drives are dramatically slower than main memory and CPUs, several layers of caching exist between the computer's main memory and the disk platters. While forcing data to the disk platters periodically might seem like a simple operation, it is not. In fact, even if a computer is fatally damaged, if the disk drives survive they can be moved to another computer with similar hardware and all committed transactions will remain intact. Successfully writing the data to the computer's permanent storage (disk drive or equivalent) ordinarily meets this requirement. One aspect of reliable operation is that all data recorded by a committed transaction should be stored in a nonvolatile area that is safe from power loss, operating system failure, and hardware failure (except failure of the nonvolatile area itself, of course). Reliability is an important property of any serious database system, and PostgreSQL does everything possible to guarantee reliable operation.
0 Comments
Leave a Reply. |