@@ -36,7 +36,7 @@ static parray*cleanup_list;
36
36
*/
37
37
static void backup_cleanup (bool fatal ,void * userdata );
38
38
static 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 );
40
40
static parray * do_backup_database (parray * backup_list ,pgBackupOption bkupopt );
41
41
static void confirm_block_size (const char * name ,int blcksz );
42
42
static void pg_start_backup (const char * label ,bool smooth ,pgBackup * backup );
@@ -252,7 +252,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
252
252
253
253
/* backup files from non-snapshot */
254
254
pgBackupGetPath (& 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 );
256
256
257
257
/* notify end of backup */
258
258
pg_stop_backup (& current );
@@ -299,7 +299,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
299
299
/* append DB cluster to backup file list */
300
300
add_files (snapshot_files ,mp , false, true);
301
301
/* 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 );
303
303
/* create file list of snapshot objects (DB cluster) */
304
304
create_file_list (snapshot_files ,mp ,DATABASE_FILE_LIST ,
305
305
NULL , true);
@@ -331,7 +331,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
331
331
/* backup files of TABLESPACE from snapshot volume */
332
332
join_path_components (prefix ,PG_TBLSPC_DIR ,oid );
333
333
join_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 );
335
335
336
336
/* create file list of snapshot objects (TABLESPACE) */
337
337
create_file_list (snapshot_files ,mp ,DATABASE_FILE_LIST ,
@@ -375,7 +375,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
375
375
376
376
/* backup files */
377
377
pgBackupGetPath (& 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 );
379
379
380
380
/* notify end of backup */
381
381
pg_stop_backup (& current );
@@ -433,15 +433,6 @@ do_backup(pgBackupOption bkupopt)
433
433
elog (ERROR_ARGS ,_ ("Required parameter not specified: BACKUP_MODE "
434
434
"(-b, --backup-mode)" ));
435
435
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
-
445
436
/* Confirm data block size and xlog block size are compatible */
446
437
check_server_version ();
447
438
@@ -832,7 +823,6 @@ backup_files(const char *from_root,
832
823
parray * files ,
833
824
parray * prev_files ,
834
825
const XLogRecPtr * lsn ,
835
- bool compress ,
836
826
const char * prefix )
837
827
{
838
828
int i ;
@@ -974,9 +964,8 @@ backup_files(const char *from_root,
974
964
975
965
/* copy the file into backup */
976
966
if (!(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 )))
980
969
{
981
970
/* record as skipped file in file_xxx.txt */
982
971
file -> write_size = BYTES_INVALID ;
@@ -986,17 +975,7 @@ backup_files(const char *from_root,
986
975
}
987
976
988
977
if (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 );
1000
979
}
1001
980
else
1002
981
{