要针对基于文本的PG还原调整哪些参数?

| 每天晚上,我们使用以下方法转储并还原200 GB的数据库:
# Production, PG 9:
pg_dump DATNAME | some-irrelevant-pipe

# QA, PG 8.3:
some-irrelevant-pipe | psql -d DATNAME
我必须进行基于文本的备份才能从8.3上的9恢复转储。 还原非常痛苦且不合理地缓慢。我注意到我的日志充满了这些:
2011-05-22 08:02:47 CDT LOG:  checkpoints are occurring too frequently (9 seconds apart)
2011-05-22 08:02:47 CDT HINT:  Consider increasing the configuration parameter \"checkpoint_segments\".
2011-05-22 08:02:54 CDT LOG:  checkpoints are occurring too frequently (7 seconds apart)
2011-05-22 08:02:54 CDT HINT:  Consider increasing the configuration parameter \"checkpoint_segments\".
我的问题是:
checkpoint_segments
的设置是否可能成为瓶颈?我还可以调整哪些其他参数来加快此过程? 那台机器有4 GB RAM。 postgresql.conf中其他可能相关的设置是:
shared_buffers = 1000MB
work_mem = 200MB
maintenance_work_mem = 200MB
effective_cache_size = 2000MB
# fsync and checkpoint settings are default
    
已邀请:
你读过这个吗?特别参见sec 14.4.9     
为了还原数据库,请更改:
# I don\'t think PostgreSQL 8.3 supports synchronous_commit
synchronous_commit = off
# only change fsync = off if your version of PG is too old to support synchronous_commit. If you do support synchronous_commit, don\'t ever change fsync to anything but on. Ever.
#fsync = off
checkpoint_segments = 25
关于checkpoint_segments,将该值设置为磁盘控制器的写缓冲区的大小。 25 = 400MB 另外,请确保您的“ѭ5”在一次交易中加载所有内容:
some-irrelevant-pipe | psql -1 -d DATNAME
    

要回复问题请先登录注册