PostgreSQL: improving pg_dump, pg_restore performance

后端 未结 6 2225
眼角桃花
眼角桃花 2020-12-22 16:15

When I began, I used pg_dump with the default plain format. I was unenlightened.

Research revealed to me time and file size improvements with pg_

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-22 16:19

    First check that you are getting reasonable IO performance from your disk setup. Then check that you PostgreSQL installation is appropriately tuned. In particular shared_buffers should be set correctly, maintenance_work_mem should be increased during the restore, full_page_writes should be off during the restore, wal_buffers should be increased to 16MB during the restore, checkpoint_segments should be increased to something like 16 during the restore, you shouldn't have any unreasonable logging on (like logging every statement executed), auto_vacuum should be disabled during the restore.

    If you are on 8.4 also experiment with parallel restore, the --jobs option for pg_restore.

提交回复
热议问题