Re: Disable WAL logging to speed up data loading
От | Kyotaro Horiguchi |
---|---|
Тема | Re: Disable WAL logging to speed up data loading |
Дата | |
Msg-id | 20210113.110706.198230270559275306.horikyota.ntt@gmail.com обсуждение исходный текст |
Ответ на | RE: Disable WAL logging to speed up data loading ("osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>) |
Ответы |
Re: Disable WAL logging to speed up data loading
RE: Disable WAL logging to speed up data loading |
Список | pgsql-hackers |
At Tue, 12 Jan 2021 07:09:28 +0000, "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com> wrote in > On Tuesday, January 12, 2021 12:52 PM Takayuki/綱川 貴之 <tsunakawa.takay@fujitsu.com> wrote: > > From: Osumi, Takamichi/大墨 昂道 <osumi.takamichi@fujitsu.com> > > > I updated the patch following this discussion, and fixed the > > > documentation as well. > > > > > > + (rmid == RM_GIST_ID && info == RM_GIST_ID) || > > + (rmid == RM_GENERIC_ID))) > > > > info is wrong for GiST, and one pair of parenthesis is unnecessary. The above > > would be: > > > > + (rmid == RM_GIST_ID && info == > > XLOG_GIST_ASSIGN_LSN) || > > + rmid == RM_GENERIC_ID)) > Oops, sorry for this careless mistake. > Fixed. And again, regression test produces no failure. @@ -449,6 +450,18 @@ XLogInsert(RmgrId rmid, uint8 info) return EndPos; } + /* Issues only limited types of WAL when wal logging is disabled */ + if (wal_level == WAL_LEVEL_NONE && + !((rmid == RM_XLOG_ID && info == XLOG_CHECKPOINT_SHUTDOWN) || + (rmid == RM_XLOG_ID && info == XLOG_PARAMETER_CHANGE) || + (rmid == RM_XACT_ID && info == XLOG_XACT_PREPARE) || + (rmid == RM_GIST_ID && info == XLOG_GIST_ASSIGN_LSN) || + rmid == RM_GENERIC_ID)) As Sawada-san mentioned, this prevents future index AMs from being pluggable. Providing an interface would work but seems a bit too invasive. The record insertion flags is there for this very purpose. XLogBeginInsert(); XLogSetRecrodFlags(XLOG_MARK_ESSENTIAL); # new flag value XLOGInsert(....); regards. -- Kyotaro Horiguchi NTT Open Source Software Center
В списке pgsql-hackers по дате отправления: