@@ -28,7 +28,6 @@ do_archive_push(char *wal_file_path, char *wal_file_name, bool overwrite)
28
28
char absolute_wal_file_path [MAXPGPATH ];
29
29
char current_dir [MAXPGPATH ];
30
30
int64 system_id ;
31
- pgBackupConfig * config ;
32
31
bool is_compress = false;
33
32
34
33
if (wal_file_name == NULL && wal_file_path == NULL )
@@ -44,16 +43,16 @@ do_archive_push(char *wal_file_path, char *wal_file_name, bool overwrite)
44
43
elog (ERROR , "getcwd() error" );
45
44
46
45
/* verify that archive-push --instance parameter is valid */
47
- config = readBackupCatalogConfigFile ();
48
46
system_id = get_system_identifier (current_dir );
49
47
50
- if (config -> pgdata == NULL )
48
+ if (instance_config . pgdata == NULL )
51
49
elog (ERROR , "cannot read pg_probackup.conf for this instance" );
52
50
53
- if (system_id != config -> system_identifier )
51
+ if (system_id != instance_config . system_identifier )
54
52
elog (ERROR , "Refuse to push WAL segment %s into archive. Instance parameters mismatch."
55
53
"Instance '%s' should have SYSTEM_ID = %ld instead of %ld" ,
56
- wal_file_name , instance_name , config -> system_identifier , system_id );
54
+ wal_file_name , instance_name , instance_config .system_identifier ,
55
+ system_id );
57
56
58
57
/* Create 'archlog_path' directory. Do nothing if it already exists. */
59
58
dir_create_dir (arclog_path , DIR_PERMISSION );
@@ -63,11 +62,11 @@ do_archive_push(char *wal_file_path, char *wal_file_name, bool overwrite)
63
62
64
63
elog (INFO , "pg_probackup archive-push from %s to %s" , absolute_wal_file_path , backup_wal_file_path );
65
64
66
- if (compress_alg == PGLZ_COMPRESS )
65
+ if (instance_config . compress_alg == PGLZ_COMPRESS )
67
66
elog (ERROR , "pglz compression is not supported" );
68
67
69
68
#ifdef HAVE_LIBZ
70
- if (compress_alg == ZLIB_COMPRESS )
69
+ if (instance_config . compress_alg == ZLIB_COMPRESS )
71
70
is_compress = IsXLogFileName (wal_file_name );
72
71
#endif
73
72
0 commit comments