Re: Fix of fake unlogged LSN initialization
От | Dilip Kumar |
---|---|
Тема | Re: Fix of fake unlogged LSN initialization |
Дата | |
Msg-id | CAFiTN-sDBOuxkOZHuGCXJ8Qrw4TQ0Uvj6iG6QDGyhTweESmk7A@mail.gmail.com обсуждение исходный текст |
Ответ на | Fix of fake unlogged LSN initialization ("tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>) |
Ответы |
Re: Fix of fake unlogged LSN initialization
RE: Fix of fake unlogged LSN initialization |
Список | pgsql-hackers |
On Sat, Oct 19, 2019 at 3:18 PM tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com> wrote: > > Hello, > > > The attached trivial patch fixes the initialization of the fake unlogged LSN. Currently, BootstrapXLOG() in initdb setsthe initial fake unlogged LSN to FirstNormalUnloggedLSN (=1000), but the recovery and pg_resetwal sets it to 1. Thepatch modifies the latter two cases to match initdb. > > I don't know if this do actual harm, because the description of FirstNormalUnloggedLSN doesn't give me any idea. > I have noticed that in StartupXlog also we reset it with 1, you might want to fix that as well? StartupXLOG { ... /* * Initialize unlogged LSN. On a clean shutdown, it's restored from the * control file. On recovery, all unlogged relations are blown away, so * the unlogged LSN counter can be reset too. */ if (ControlFile->state == DB_SHUTDOWNED) XLogCtl->unloggedLSN = ControlFile->unloggedLSN; else XLogCtl->unloggedLSN = 1; -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: