Greg Spiegelberg wrote:
I know I'm talking development now but is there a case for a pg_xlog block device to remove the file system overhead and guaranteeing your data is written sequentially every time?
It's possible to set the PostgreSQL wal_sync_method parameter in the database to open_datasync or open_sync, and if you have an operating system that supports direct writes it will use those and bypass things like the OS write cache. That's close to what you're suggesting, supposedly portable, and it does show some significant benefit when it's properly supported. Problem has been, the synchronous writing code on Linux in particular hasn't ever worked right against ext3, and the PostgreSQL code doesn't make the right call at all on Solaris. So there's two popular platforms that it just plain doesn't work on, even though it should.
We've gotten reports that there are bleeding edge Linux kernel and library versions available now that finally fix that issue, and that PostgreSQL automatically takes advantage of them when it's compiled on one of them. But I'm not aware of any distribution that makes this easy to try out that's available yet, paint is still wet on the code I think.
-- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@xxxxxxxxxxxxxxx www.2ndQuadrant.us -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance