On 09/30/2011 12:28 PM, Andrew Shved wrote:
There's not really a good answer to this yet. Write-once data is common enough that I'd like to see some accelerated paths for adding it appear. I'm not aware of anyone working in that direction right now though. Normally writes in PostgreSQL can result in blocks being written out many times: -pg_xlog image -Initial write to data block on disk -Write(s) to update hint bits -Initial VACUUM -XID wraparound VACUUM FREEZE If you aggressively run VACUUM FREEZE yourself, setting vacuum_freeze_min_age and possibly autovacuum_freeze_max_age to lower values than the defaults, you might avoid some number of these multiple writes, which are wasted from your perspective. Aim to commit and freeze as fast as possible afterwards, avoiding some of the intermediate writes you might otherwise see. That's the best that can be done without some hacking on the server code. -- Greg Smith 2ndQuadrant US greg@xxxxxxxxxxxxxxx Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us |