@@ -28,7 +28,6 @@ do_archive_push(char *wal_file_path, char *wal_file_name, bool overwrite)
2828 char absolute_wal_file_path [MAXPGPATH ];
2929 char current_dir [MAXPGPATH ];
3030 int64 system_id ;
31- pgBackupConfig * config ;
3231 bool is_compress = false;
3332
3433 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)
4443 elog (ERROR , "getcwd() error" );
4544
4645 /* verify that archive-push --instance parameter is valid */
47- config = readBackupCatalogConfigFile ();
4846 system_id = get_system_identifier (current_dir );
4947
50- if (config -> pgdata == NULL )
48+ if (instance_config . pgdata == NULL )
5149 elog (ERROR , "cannot read pg_probackup.conf for this instance" );
5250
53- if (system_id != config -> system_identifier )
51+ if (system_id != instance_config . system_identifier )
5452 elog (ERROR , "Refuse to push WAL segment %s into archive. Instance parameters mismatch."
5553 "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 );
5756
5857 /* Create 'archlog_path' directory. Do nothing if it already exists. */
5958 dir_create_dir (arclog_path , DIR_PERMISSION );
@@ -63,11 +62,11 @@ do_archive_push(char *wal_file_path, char *wal_file_name, bool overwrite)
6362
6463 elog (INFO , "pg_probackup archive-push from %s to %s" , absolute_wal_file_path , backup_wal_file_path );
6564
66- if (compress_alg == PGLZ_COMPRESS )
65+ if (instance_config . compress_alg == PGLZ_COMPRESS )
6766 elog (ERROR , "pglz compression is not supported" );
6867
6968#ifdef HAVE_LIBZ
70- if (compress_alg == ZLIB_COMPRESS )
69+ if (instance_config . compress_alg == ZLIB_COMPRESS )
7170 is_compress = IsXLogFileName (wal_file_name );
7271#endif
7372
0 commit comments