On Mon, Mar 28, 2022 at 2:18 AM Dilip Kumar <dilipbal...@gmail.com> wrote: > > I have put the similar logic for relmap_update WAL replay as well, > > There was some mistake in the last patch, basically, for relmap update > also I have checked the missing tablespace directory but I should have > checked the missing database directory so I have fixed that. > > > Now, is it possible to get the FPI without smgr_create wal in other > > cases? If it is then that problem is orthogonal to this path, but > > anyway I could not find any such scenario. > > I have digged further into it, tried manually removing the directory > before XLOG_FPI, but I noticed that during FPI also > XLogReadBufferExtended() take cares of creating the missing files > using smgrcreate() and that intern take care of missing directory > creation so I don't think we have any problem here.
I don't understand whether XLOG_RELMAP_UPDATE should be just doing smgrcreate() as we would for most WAL records or whether it should be adopting the new system introduced by 49d9cfc68bf4e0d32a948fe72d5a0ef7f464944e. I wrote about this concern over here: http://postgr.es/m/CA+TgmoYcUPL+WOJL2ZzhH=zmrhj0iOQ=icfm0suyqbbqzea...@mail.gmail.com But apart from that question your adaptations here look reasonable to me. -- Robert Haas EDB: http://www.enterprisedb.com