The current WAL recovery implementation does not recover newly created
objects such as tables. My suggested patch is:
When XLogOpenRelation fails to open the relation file, if errno is
ENOENT (no file or directory) we shuld attempt to recreate the file
using smgrcreate.
This seems to work fine for tables, indexes and sequences but can anyone
see any potential problems? I have not tried this with Toast tables;
are these handled any differently?
Is it reasonable to assume that recreating the file in this way is
safe? It seems OK to me as we only recreate the file if it does not
already exist, so we are not in danger of making a bad situation worse.
If no-one tells me this is a bad idea, I will submit a patch.
--
Marc marc(at)bloodnok(dot)com