diff options
Diffstat (limited to 'src/backend/backup/basebackup_incremental.c')
-rw-r--r-- | src/backend/backup/basebackup_incremental.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/backend/backup/basebackup_incremental.c b/src/backend/backup/basebackup_incremental.c index 18c78adda26..a8f2e72e7b1 100644 --- a/src/backend/backup/basebackup_incremental.c +++ b/src/backend/backup/basebackup_incremental.c @@ -777,9 +777,25 @@ GetFileBackupMethod(IncrementalBackupInfo *ib, const char *path, return BACK_UP_FILE_FULLY; } - /* Look up the block reference table entry. */ + /* + * Look up the special block reference table entry for the database as + * a whole. + */ rlocator.spcOid = spcoid; rlocator.dbOid = dboid; + rlocator.relNumber = 0; + if (BlockRefTableGetEntry(ib->brtab, &rlocator, MAIN_FORKNUM, + &limit_block) != NULL) + { + /* + * According to the WAL summary, this database OID/tablespace OID + * pairing has been created since the previous backup. So, everything + * in it must be backed up fully. + */ + return BACK_UP_FILE_FULLY; + } + + /* Look up the block reference table entry for this relfilenode. */ rlocator.relNumber = relfilenumber; brtentry = BlockRefTableGetEntry(ib->brtab, &rlocator, forknum, &limit_block); |