title: pg_basebackup is taking more time than expected
body: <p>We are using 9.2 postgresql database.</p>
  
  <p>We have database with the size of 425GB. Out of this 425 GB, Around 40 to 60% of space occupied by the indexes. Ram allocated to this machine is 32GB  and configuration parameters below.</p>
  
  <pre><code>max_connections = 800            
  shared_buffers = 9GB     
  effective_cache_size = 18GB   
  work_mem = 10MB  
  maintenance_work_mem = 1536MB   
  checkpoint_segments = 50
  wal_keep_segments = 80
  checkpoint_completion_target = 0.9
  wal_buffers = 16MB
  Max_prepared_transactions =0  
  synchronous_commit = on
  </code></pre>
  
  <p>In order to take the backup of the database we are using pg_basebackup utility. But it is taking several hours (Around 18hours). Please guide me what are the configuration parameters need to modify to reduce the time taken by the pg_basebackup utility.</p>
  
  <p>Is there any possibility to exclude the index data while taking the pg_basebackup?</p>
  
  <p>pg_basebackup utility  depends on which are the parameters?</p>
  
  <p>Is there any possibility to run the pg_basebackup in multi thread?</p>
  
  <p>To improve the speed of the backup of database using pg_basebackup utility we shutdown the database and started alone database services. Till that time other sevices won't run. We observed some improvement but any other things we need to perform to reduce the time taken by the  pg_basebackup utility.</p>
  
  <p>We are using below command to take the backup of the database. Any improvements to reduce the time taken by backup statement.</p>
  
  <pre><code> $PGHOME/bin/pg_basebackup -p 5433 -U postgres -P -v -x --format=tar --gzip --compress=6 --pgdata=- -D /opt/backup_db
  </code></pre>