During prewarm, you seem to be using binary mode to open a file whereas during dump binary flag is not passed. Is there a reason for such a difference?
-- Sorry fixed now, both use binary.
3. + ereport(LOG, + (errmsg("saved metadata info of %d blocks", num_blocks)));
It doesn't seem like a good idea to log this info at each dump interval. How about making this as a DEBUG1 message?
-- Fixed, made it as DEBUG1 along with another message "autoprewarm load task ended" message.