PostgreSQL的磁盘空间占用问题

豆豆网   技术应用频道   2007年10月26日  【字号: 收藏本文

本文详细介绍PostgreSQL的磁盘空间占用问题

  Asaneasyperformanceboostwithnodownside,makesurethefilesystemonwhichyourdatabaseiskeptismounted"noatime",whichturnsofftheaccesstimebookkeeping. 

  4.2TrytheAutoVacuumdaemon

  ThereisalittleknownmoduleinPostgreSQLcontribdirectorycalledaspgavd.Itworksinconjunctionwithstatisticscollector.Itperiodicallyconnectstoadatabaseandchecksifithasdoneenoughoperationssincethelastcheck.Ifyes,itwillvacuumthedatabase. 

  Essentiallyitwillvacuumthedatabasewhenitneedsit.Itwouldgetridofplayingwithcronsettingsforvacuumfrequency.Itshouldresultinbetterdatabaseperformancebyeliminatingoverduevacuumissues. 

  4.3TryFreeBSD

  Largeupdates,deletes,andvacuuminPostgreSQLareverydiskintensiveprocesses.Inparticular,sincevacuumgobblesupIObandwidth,therestofthedatabaseactivitiescouldbeaffectedadverselywhenvacuumingverylargetables. 

  OS'sfromtheBSDfamily,suchasFreeBSD,dynamicallyaltertheIOpriorityofaprocess.Soifyoulowerthepriorityofavacuumprocess,itshouldnotchewasmuchbandwidthandwillbetterallowthedatabasetoperformnormally.Ofcoursethismeansthatvacuumcouldtakelonger,whichwouldbeproblematicfora"vacuumfull." 

  IfyouarenotdonewithyourchoiceofOSforyourserverplatform,considerBSDforthisreason. 

  5TheCONFSettingGuide

  AvailablehereisanAnnotatedGuidetothePostgreSQLconfigurationfilesettings,inbothOpenOffice.organdPDFformat.Thisguideexpandsontheofficialdocumentationandmayeventuallybeincorporatedintoit. 

责编:豆豆技术应用

正在加载评论...