3 ms·
If your PG setup leaves writes sitting in the buffer cache after transaction commits, it's not working right.
by fulafel 11y ago
If your PG setup leaves writes sitting in the buffer cache after transaction commits, it's not working right.
- pmontra 11y agoI'm sure that it persists them to disk but the test suite keeps running at the same speed, so it must happen when it's less inconvenient. Buying enough RAM to cache there all the DB is a common recommendation even if it can need some careful configuration http://dba.stackexchange.com/questions/18484/tuning-postgresql-for-large-amounts-of-ram http://dba.stackexchange.com/questions/18484/tuning-postgres...
- fulafel 11y agoStill sounds like it's not working right, unless it was a read-only test. Transaction commits force synchronous disk writes, meaning the transaction operation will not finish and return before the spinning disk has physically done one or more disk writes. (Unless you have an expensive storage system with non-volatile cache memory)
- pmontra 11y agoI don't think you can count on the file system to actually persist data on disk when you call flush(). Example http://rhaas.blogspot.it/2014/03/linuxs-fsync-woes-are-getting-some.html?m=1 http://rhaas.blogspot.it/2014/03/linuxs-fsync-woes-are-getti...