diff options
Diffstat (limited to 'src/backend/replication/basebackup.c')
-rw-r--r-- | src/backend/replication/basebackup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 50c052e9935..a79048d233d 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -1446,8 +1446,10 @@ sendFile(const char *readfilename, const char *tarfilename, struct stat *statbuf * written only halfway and the checksum would not be valid. * However, replaying WAL would reinstate the correct page in * this case. + * We also skip completely new pages, since they don't have + * a checksum yet. */ - if (PageGetLSN(page) < startptr) + if (!PageIsNew(page) && PageGetLSN(page) < startptr) { checksum = pg_checksum_page((char *) page, blkno + segmentno * RELSEG_SIZE); phdr = (PageHeader) page; |