Re: During Xlog replaying, is there maybe emitted xlog?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: During Xlog replaying, is there maybe emitted xlog?
Дата
Msg-id 13579.1342577119@sss.pgh.pa.us
обсуждение исходный текст
Ответ на During Xlog replaying, is there maybe emitted xlog?  ("xu2002261" <xu2002261@163.com>)
Список pgsql-hackers
"xu2002261" <xu2002261@163.com> writes:
> Hi all,
>      I reviewed the source code, and saw the following calling path:

>      StartupXLOG() > StartupDatabase() > RmgrTable[rmid].rm_cleanup() > btree_xlog_cleanup() > _bt_insert_parent >
_bt_insertonpg()> XLogInsert()
 

> As we can see, during xlog replaying, XLog may be emitted. So whether there are some *ISSUE* in above calling stack?

No, it's entirely correct.  That path isn't "during" replay, it's upon
completion of replay, where we're cleaning up anything that failed to be
completed before the crash.  Emitting more WAL is allowed then.  Note
the comment a few lines above the rm_cleanup calls:
    /*     * Resource managers might need to write WAL records, eg, to record     * index cleanup actions.  So
temporarilyenable XLogInsertAllowed in     * this process only.     */
 
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "xu2002261"
Дата:
Сообщение: During Xlog replaying, is there maybe emitted xlog?
Следующее
От: "xu2002261"
Дата:
Сообщение: Re: During Xlog replaying, is there maybe emitted xlog?