|
3 | 3 | * backup.c: backup DB cluster, archived WAL |
4 | 4 | * |
5 | 5 | * Portions Copyright (c) 2009-2013, NIPPON TELEGRAPH AND TELEPHONE CORPORATION |
6 | | - * Portions Copyright (c) 2015-2019, Postgres Professional |
| 6 | + * Portions Copyright (c) 2015-2022, Postgres Professional |
7 | 7 | * |
8 | 8 | *------------------------------------------------------------------------- |
9 | 9 | */ |
@@ -116,7 +116,7 @@ do_backup_pg(InstanceState *instanceState, PGconn *backup_conn, |
116 | 116 | charpretty_time[20]; |
117 | 117 | charpretty_bytes[20]; |
118 | 118 |
|
119 | | -elog(LOG,"Database backup start"); |
| 119 | +elog(INFO,"Database backup start"); |
120 | 120 | if(current.external_dir_str) |
121 | 121 | { |
122 | 122 | external_dirs=make_external_directory_list(current.external_dir_str, |
@@ -336,11 +336,11 @@ do_backup_pg(InstanceState *instanceState, PGconn *backup_conn, |
336 | 336 | /* Extract information about files in backup_list parsing their names:*/ |
337 | 337 | parse_filelist_filenames(backup_files_list,instance_config.pgdata); |
338 | 338 |
|
339 | | -elog(LOG,"Current Start LSN: %X/%X, TLI: %X", |
| 339 | +elog(INFO,"Current Start LSN: %X/%X, TLI: %X", |
340 | 340 | (uint32) (current.start_lsn >>32), (uint32) (current.start_lsn), |
341 | 341 | current.tli); |
342 | 342 | if (current.backup_mode!=BACKUP_MODE_FULL) |
343 | | -elog(LOG,"Parent Start LSN: %X/%X, TLI: %X", |
| 343 | +elog(INFO,"Parent Start LSN: %X/%X, TLI: %X", |
344 | 344 | (uint32) (prev_backup->start_lsn >>32), (uint32) (prev_backup->start_lsn), |
345 | 345 | prev_backup->tli); |
346 | 346 |
|
@@ -412,7 +412,7 @@ do_backup_pg(InstanceState *instanceState, PGconn *backup_conn, |
412 | 412 | else |
413 | 413 | join_path_components(dirpath,current.database_dir,file->rel_path); |
414 | 414 |
|
415 | | -elog(VERBOSE,"Create directory '%s'",dirpath); |
| 415 | +elog(LOG,"Create directory '%s'",dirpath); |
416 | 416 | fio_mkdir(dirpath,DIR_PERMISSION,FIO_BACKUP_HOST); |
417 | 417 | } |
418 | 418 |
|
@@ -673,7 +673,7 @@ pgdata_basic_setup(ConnectionOptions conn_opt, PGNodeInfo *nodeInfo) |
673 | 673 | nodeInfo->checksum_version=current.checksum_version; |
674 | 674 |
|
675 | 675 | if (current.checksum_version) |
676 | | -elog(LOG,"This PostgreSQL instance was initialized with data block checksums. " |
| 676 | +elog(INFO,"This PostgreSQL instance was initialized with data block checksums. " |
677 | 677 | "Data block corruption will be detected"); |
678 | 678 | else |
679 | 679 | elog(WARNING,"This PostgreSQL instance was initialized without data block checksums. " |
@@ -1513,7 +1513,7 @@ wait_wal_and_calculate_stop_lsn(const char *xlog_path, XLogRecPtr stop_lsn, pgBa |
1513 | 1513 | stop_lsn_exists= true; |
1514 | 1514 | } |
1515 | 1515 |
|
1516 | | -elog(LOG,"stop_lsn: %X/%X", |
| 1516 | +elog(INFO,"stop_lsn: %X/%X", |
1517 | 1517 | (uint32) (stop_lsn >>32), (uint32) (stop_lsn)); |
1518 | 1518 |
|
1519 | 1519 | /* |
@@ -1902,15 +1902,15 @@ pg_stop_backup(InstanceState *instanceState, pgBackup *backup, PGconn *pg_startb |
1902 | 1902 |
|
1903 | 1903 | backup->recovery_xid=stop_backup_result.snapshot_xid; |
1904 | 1904 |
|
1905 | | -elog(LOG,"Getting the Recovery Time from WAL"); |
| 1905 | +elog(INFO,"Getting the Recovery Time from WAL"); |
1906 | 1906 |
|
1907 | 1907 | /* iterate over WAL from stop_backup lsn to start_backup lsn */ |
1908 | 1908 | if (!read_recovery_info(xlog_path,backup->tli, |
1909 | 1909 | instance_config.xlog_seg_size, |
1910 | 1910 | backup->start_lsn,backup->stop_lsn, |
1911 | 1911 | &backup->recovery_time)) |
1912 | 1912 | { |
1913 | | -elog(LOG,"Failed to find Recovery Time in WAL, forced to trust current_timestamp"); |
| 1913 | +elog(INFO,"Failed to find Recovery Time in WAL, forced to trust current_timestamp"); |
1914 | 1914 | backup->recovery_time=stop_backup_result.invocation_time; |
1915 | 1915 | } |
1916 | 1916 |
|
@@ -1992,9 +1992,8 @@ backup_files(void *arg) |
1992 | 1992 | if (interrupted||thread_interrupted) |
1993 | 1993 | elog(ERROR,"interrupted during backup"); |
1994 | 1994 |
|
1995 | | -if (progress) |
1996 | | -elog(INFO,"Progress: (%d/%d). Process file \"%s\"", |
1997 | | -i+1,n_backup_files_list,file->rel_path); |
| 1995 | +elog(progress ?INFO :LOG,"Progress: (%d/%d). Process file \"%s\"", |
| 1996 | +i+1,n_backup_files_list,file->rel_path); |
1998 | 1997 |
|
1999 | 1998 | /* Handle zero sized files */ |
2000 | 1999 | if (file->size==0) |
@@ -2064,11 +2063,11 @@ backup_files(void *arg) |
2064 | 2063 |
|
2065 | 2064 | if (file->write_size==BYTES_INVALID) |
2066 | 2065 | { |
2067 | | -elog(VERBOSE,"Skipping the unchanged file: \"%s\"",from_fullpath); |
| 2066 | +elog(LOG,"Skipping the unchanged file: \"%s\"",from_fullpath); |
2068 | 2067 | continue; |
2069 | 2068 | } |
2070 | 2069 |
|
2071 | | -elog(VERBOSE,"File \"%s\". Copied "INT64_FORMAT" bytes", |
| 2070 | +elog(LOG,"File \"%s\". Copied "INT64_FORMAT" bytes", |
2072 | 2071 | from_fullpath,file->write_size); |
2073 | 2072 | } |
2074 | 2073 |
|
@@ -2186,26 +2185,26 @@ set_cfs_datafiles(parray *files, const char *root, char *relative, size_t i) |
2186 | 2185 | elog(ERROR,"Out of memory"); |
2187 | 2186 | len=strlen("/pg_compression"); |
2188 | 2187 | cfs_tblspc_path[strlen(cfs_tblspc_path)-len]=0; |
2189 | | -elog(VERBOSE,"CFS DIRECTORY %s, pg_compression path: %s",cfs_tblspc_path,relative); |
| 2188 | +elog(LOG,"CFS DIRECTORY %s, pg_compression path: %s",cfs_tblspc_path,relative); |
2190 | 2189 |
|
2191 | 2190 | for (p= (int)i;p >=0;p--) |
2192 | 2191 | { |
2193 | 2192 | prev_file= (pgFile*)parray_get(files, (size_t)p); |
2194 | 2193 |
|
2195 | | -elog(VERBOSE,"Checking file in cfs tablespace %s",prev_file->rel_path); |
| 2194 | +elog(LOG,"Checking file in cfs tablespace %s",prev_file->rel_path); |
2196 | 2195 |
|
2197 | 2196 | if (strstr(prev_file->rel_path,cfs_tblspc_path)!=NULL) |
2198 | 2197 | { |
2199 | 2198 | if (S_ISREG(prev_file->mode)&&prev_file->is_datafile) |
2200 | 2199 | { |
2201 | | -elog(VERBOSE,"Setting 'is_cfs' on file %s, name %s", |
| 2200 | +elog(LOG,"Setting 'is_cfs' on file %s, name %s", |
2202 | 2201 | prev_file->rel_path,prev_file->name); |
2203 | 2202 | prev_file->is_cfs= true; |
2204 | 2203 | } |
2205 | 2204 | } |
2206 | 2205 | else |
2207 | 2206 | { |
2208 | | -elog(VERBOSE,"Breaking on %s",prev_file->rel_path); |
| 2207 | +elog(LOG,"Breaking on %s",prev_file->rel_path); |
2209 | 2208 | break; |
2210 | 2209 | } |
2211 | 2210 | } |
|