@@ -179,7 +179,7 @@ push_wal_file(const char *from_path, const char *to_path, bool is_compress,
179179snprintf (to_path_temp ,sizeof (to_path_temp ),"%s.partial" ,gz_to_path );
180180
181181gz_out = fio_gzopen (to_path_temp ,PG_BINARY_W ,instance_config .compress_level ,FIO_BACKUP_HOST ,
182- instance_config . encryption );
182+ current_backup -> encrypted );
183183if (gz_out == NULL )
184184elog (ERROR ,"Cannot open destination temporary WAL file \"%s\": %s" ,
185185to_path_temp ,strerror (errno ));
@@ -194,7 +194,7 @@ push_wal_file(const char *from_path, const char *to_path, bool is_compress,
194194if (out_fd < 0 )
195195elog (ERROR ,"Cannot open destination temporary WAL file \"%s\": %s" ,
196196to_path_temp ,strerror (errno ));
197- out = fio_fdopen (to_path_temp ,out_fd ,PG_BINARY_W ,instance_config . encryption );
197+ out = fio_fdopen (to_path_temp ,out_fd ,PG_BINARY_W ,current_backup -> encrypted );
198198}
199199
200200/* copy content */
@@ -336,7 +336,7 @@ get_wal_file(const char *from_path, const char *to_path)
336336/* open file for read */
337337if (!is_decompress )
338338{
339- in = fio_fopen (from_path ,PG_BINARY_R ,FIO_BACKUP_HOST ,instance_config . encryption );
339+ in = fio_fopen (from_path ,PG_BINARY_R ,FIO_BACKUP_HOST ,current_backup -> encrypted );
340340if (in == NULL )
341341elog (ERROR ,"Cannot open source WAL file \"%s\": %s" ,
342342from_path ,strerror (errno ));
@@ -345,7 +345,7 @@ get_wal_file(const char *from_path, const char *to_path)
345345else
346346{
347347gz_in = fio_gzopen (gz_from_path ,PG_BINARY_R ,Z_DEFAULT_COMPRESSION ,
348- FIO_BACKUP_HOST ,instance_config . encryption );
348+ FIO_BACKUP_HOST ,current_backup -> encrypted );
349349if (gz_in == NULL )
350350elog (ERROR ,"Cannot open compressed WAL file \"%s\": %s" ,
351351gz_from_path ,strerror (errno ));
@@ -500,7 +500,7 @@ fileEqualCRC(const char *path1, const char *path2, bool path2_is_compressed)
500500gzFile gz_in = NULL ;
501501
502502INIT_FILE_CRC32 (true,crc2 );
503- gz_in = fio_gzopen (path2 ,PG_BINARY_R ,Z_DEFAULT_COMPRESSION ,FIO_BACKUP_HOST ,instance_config . encryption );
503+ gz_in = fio_gzopen (path2 ,PG_BINARY_R ,Z_DEFAULT_COMPRESSION ,FIO_BACKUP_HOST ,current_backup -> encrypted );
504504if (gz_in == NULL )
505505/* File cannot be read */
506506elog (ERROR ,
@@ -531,7 +531,7 @@ fileEqualCRC(const char *path1, const char *path2, bool path2_is_compressed)
531531else
532532#endif
533533{
534- crc2 = pgFileGetCRC (path2 , true, true,NULL ,FIO_BACKUP_HOST ,instance_config . encryption );
534+ crc2 = pgFileGetCRC (path2 , true, true,NULL ,FIO_BACKUP_HOST ,current_backup -> encrypted );
535535}
536536
537537/* Get checksum of original file */