Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd40e299

Browse files
committed
fix dest backup search
1 parent419008d commitd40e299

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

‎backup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,7 @@ pg_stop_backup(pgBackup *backup)
876876
fwrite(PQgetvalue(res,0,1),1,strlen(PQgetvalue(res,0,1)),fp);
877877
fclose(fp);
878878

879+
/* TODO What for do we save the file into backup_list? */
879880
file=pgFileNew(backup_label, true);
880881
calc_file_checksum(file);
881882
free(file->path);

‎data.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ restore_file_partly(const char *from_root,const char *to_root, pgFile *file)
319319
interrno_tmp;
320320
structstatst;
321321
charto_path[MAXPGPATH];
322-
charbuf[8192];
322+
charbuf[BLCKSZ];
323323
size_twrite_size=0;
324324

325325
join_path_components(to_path,to_root,file->path+strlen(from_root)+1);
@@ -562,7 +562,6 @@ is_compressed_data_file(pgFile *file)
562562
}
563563

564564
/*
565-
* TODO Don't use buffer.
566565
* Add check that file is not bigger than RELSEG_SIZE.
567566
* WARNING compressed file can be exceed this limit.
568567
* Add compression.
@@ -575,7 +574,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
575574
FILE*out;
576575
size_tread_len=0;
577576
interrno_tmp;
578-
charbuf[8192];
577+
charbuf[BLCKSZ];
579578
structstatst;
580579
pg_crc32crc;
581580

@@ -705,7 +704,7 @@ copy_file_partly(const char *from_root, const char *to_root,
705704
size_tread_len=0;
706705
interrno_tmp;
707706
structstatst;
708-
charbuf[8192];
707+
charbuf[BLCKSZ];
709708

710709
/* reset size summary */
711710
file->read_size=0;
@@ -823,15 +822,14 @@ copy_file_partly(const char *from_root, const char *to_root,
823822
* Calculate checksum of various files which are not copied from PGDATA,
824823
* but created in process of backup, such as stream XLOG files,
825824
* PG_TABLESPACE_MAP_FILE and PG_BACKUP_LABEL_FILE.
826-
* TODO Why do we read them into a buffer of blocksize?
827825
*/
828826
bool
829827
calc_file_checksum(pgFile*file)
830828
{
831829
FILE*in;
832830
size_tread_len=0;
833831
interrno_tmp;
834-
charbuf[8192];
832+
charbuf[BLCKSZ];
835833
structstatst;
836834
pg_crc32crc;
837835

‎restore.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ do_restore_or_validate(time_t target_backup_id,
135135
* We found target backup. Check its status and
136136
* ensure that it satisfies recovery target.
137137
*/
138-
if (target_backup_id==current_backup->start_time
138+
if ((target_backup_id==current_backup->start_time
139139
||target_backup_id==INVALID_BACKUP_ID)
140+
&& !dest_backup)
140141
{
141142
if (current_backup->status!=BACKUP_STATUS_OK)
142143
elog(ERROR,"given backup %s is in %s status",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp