{
Assert(entry->isrelfile);
- if (entry->target_type != FILE_TYPE_REGULAR)
- pg_fatal("unexpected page modification for non-regular file \"%s\"",
- entry->path);
-
- if (entry->target_exists && entry->source_exists)
+ if (entry->target_exists)
{
- off_t end_offset;
+ if (entry->target_type != FILE_TYPE_REGULAR)
+ pg_fatal("unexpected page modification for non-regular file \"%s\"",
+ entry->path);
- end_offset = (blkno_inseg + 1) * BLCKSZ;
- if (end_offset <= entry->source_size && end_offset <= entry->target_size)
- datapagemap_add(&entry->target_pages_to_overwrite, blkno_inseg);
+ if (entry->source_exists)
+ {
+ off_t end_offset;
+
+ end_offset = (blkno_inseg + 1) * BLCKSZ;
+ if (end_offset <= entry->source_size && end_offset <= entry->target_size)
+ datapagemap_add(&entry->target_pages_to_overwrite, blkno_inseg);
+ }
}
}
}
primary_psql("VACUUM tail_tbl");
# Drop drop_tbl. pg_rewind should copy it back.
+ primary_psql("insert into drop_tbl values ('in primary, after promotion')");
primary_psql("DROP TABLE drop_tbl");
# Before running pg_rewind, do a couple of extra tests with several