pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: xu2002261 <xu2002261@163.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: During Xlog replaying, is there maybe emitted xlog?
Date: Wed, 18 Jul 2012 10:16:35 +0800
Message-ID: <201207181016343750030@163.com> (raw)
References: <201207180929513283240@163.com>
	<13579.1342577119@sss.pgh.pa.us>

Thanks a lot. 

oops, indeed, the clean up stage is not in the XLog replay, So there is no problem.


2012-07-18 



xu2002261 



发件人: Tom Lane 
发送时间: 2012-07-18  10:05:26 
收件人: xu2002261 
抄送: pgsql-hackers 
主题: Re: [HACKERS] During Xlog replaying, is there maybe emitted xlog? 
 
"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 temporarily enable XLogInsertAllowed in
 * this process only.
 */
regards, tom lane


view thread (3+ messages)

Message-ID: <201207181016343750030@163.com>
Permalink:  ../201207181016343750030@163.com/
Also on:    postgresql.org/message-id/201207181016343750030@163.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: xu2002261@163.com, tgl@sss.pgh.pa.us
  Subject: Re: During Xlog replaying, is there maybe emitted xlog?
  In-Reply-To: <201207181016343750030@163.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox