Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 492a856

Browse files
author
Artur Zakirov
committed
Merge branch 'ptrack' of git.postgrespro.ru:pgpro-dev/pg_probackup into ptrack
2 parents aa27178 + 8775a39 commit 492a856

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

data.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ backup_data_page(pgFile *file, const XLogRecPtr *lsn,
8181

8282
if (st.st_size/BLCKSZ <= blknum)
8383
{
84-
elog(WARNING, "File: %s, file was truncated after backup start."
85-
"Expected nblocks %u. Real nblocks %ld. Cannot read block %u ",
86-
file->path, nblocks, st.st_size/BLCKSZ, blknum);
84+
if (verbose)
85+
elog(LOG, "File: %s, file was truncated after backup start."
86+
"Expected nblocks %u. Real nblocks %ld. Cannot read block %u ",
87+
file->path, nblocks, st.st_size/BLCKSZ, blknum);
8788
return;
8889
}
8990
else

show.c

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ do_show(time_t backup_id)
6868
int
6969
do_retention_show(void)
7070
{
71+
if (retention_redundancy == 0 && retention_window == 0)
72+
{
73+
fprintf(stdout, "No retention policy is set\n");
74+
return 0;
75+
}
76+
7177
fprintf(stdout, "# retention policy\n");
7278
if (retention_redundancy > 0)
7379
fprintf(stdout, "REDUNDANCY=%u\n", retention_redundancy);

0 commit comments

Comments
 (0)