@@ -36,7 +36,7 @@ static parray*cleanup_list;
3636 */
3737static void backup_cleanup (bool fatal ,void * userdata );
3838static void backup_files (const char * from_root ,const char * to_root ,
39- parray * files ,parray * prev_files ,const XLogRecPtr * lsn ,bool compress , const char * prefix );
39+ parray * files ,parray * prev_files ,const XLogRecPtr * lsn ,const char * prefix );
4040static parray * do_backup_database (parray * backup_list ,pgBackupOption bkupopt );
4141static void confirm_block_size (const char * name ,int blcksz );
4242static void pg_start_backup (const char * label ,bool smooth ,pgBackup * backup );
@@ -252,7 +252,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
252252
253253/* backup files from non-snapshot */
254254pgBackupGetPath (& current ,path ,lengthof (path ),DATABASE_DIR );
255- backup_files (pgdata ,path ,files ,prev_files ,lsn ,current . compress_data , NULL );
255+ backup_files (pgdata ,path ,files ,prev_files ,lsn ,NULL );
256256
257257/* notify end of backup */
258258pg_stop_backup (& current );
@@ -299,7 +299,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
299299/* append DB cluster to backup file list */
300300add_files (snapshot_files ,mp , false, true);
301301/* backup files of DB cluster from snapshot volume */
302- backup_files (mp ,path ,snapshot_files ,prev_files ,lsn ,current . compress_data , NULL );
302+ backup_files (mp ,path ,snapshot_files ,prev_files ,lsn ,NULL );
303303/* create file list of snapshot objects (DB cluster) */
304304create_file_list (snapshot_files ,mp ,DATABASE_FILE_LIST ,
305305NULL , true);
@@ -331,7 +331,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
331331/* backup files of TABLESPACE from snapshot volume */
332332join_path_components (prefix ,PG_TBLSPC_DIR ,oid );
333333join_path_components (dest ,path ,prefix );
334- backup_files (mp ,dest ,snapshot_files ,prev_files ,lsn ,current . compress_data , prefix );
334+ backup_files (mp ,dest ,snapshot_files ,prev_files ,lsn ,prefix );
335335
336336/* create file list of snapshot objects (TABLESPACE) */
337337create_file_list (snapshot_files ,mp ,DATABASE_FILE_LIST ,
@@ -375,7 +375,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
375375
376376/* backup files */
377377pgBackupGetPath (& current ,path ,lengthof (path ),DATABASE_DIR );
378- backup_files (pgdata ,path ,files ,prev_files ,lsn ,current . compress_data , NULL );
378+ backup_files (pgdata ,path ,files ,prev_files ,lsn ,NULL );
379379
380380/* notify end of backup */
381381pg_stop_backup (& current );
@@ -433,15 +433,6 @@ do_backup(pgBackupOption bkupopt)
433433elog (ERROR_ARGS ,_ ("Required parameter not specified: BACKUP_MODE "
434434"(-b, --backup-mode)" ));
435435
436- #ifndef HAVE_LIBZ
437- if (current .compress_data )
438- {
439- elog (WARNING ,_ ("requested compression not available in this "
440- "installation. Archive will not be compressed" ));
441- current .compress_data = false;
442- }
443- #endif
444-
445436/* Confirm data block size and xlog block size are compatible */
446437check_server_version ();
447438
@@ -832,7 +823,6 @@ backup_files(const char *from_root,
832823parray * files ,
833824parray * prev_files ,
834825const XLogRecPtr * lsn ,
835- bool compress ,
836826const char * prefix )
837827{
838828int i ;
@@ -974,9 +964,8 @@ backup_files(const char *from_root,
974964
975965/* copy the file into backup */
976966if (!(file -> is_datafile
977- ?backup_data_file (from_root ,to_root ,file ,lsn ,compress )
978- :copy_file (from_root ,to_root ,file ,
979- compress ?COMPRESSION :NO_COMPRESSION )))
967+ ?backup_data_file (from_root ,to_root ,file ,lsn )
968+ :copy_file (from_root ,to_root ,file )))
980969{
981970/* record as skipped file in file_xxx.txt */
982971file -> write_size = BYTES_INVALID ;
@@ -986,17 +975,7 @@ backup_files(const char *from_root,
986975}
987976
988977if (verbose )
989- {
990- /* print compression rate */
991- if (file -> write_size != file -> size )
992- printf (_ ("compressed %lu (%.2f%% of %lu)\n" ),
993- (unsigned long )file -> write_size ,
994- 100.0 * file -> write_size /file -> size ,
995- (unsigned long )file -> size );
996- else
997- printf (_ ("copied %lu\n" ), (unsigned long )file -> write_size );
998- }
999-
978+ printf (_ ("copied %lu\n" ), (unsigned long )file -> write_size );
1000979}
1001980else
1002981{