执行alter system switch logfile之后,查看alert log,显示如下:
老外的一篇文章介绍如下:
These messages are not cause for concern unless there is a significant time gap between “cannot allow new log” and “advanced to log sequence” message. In some cases users benefited with db_writer_processes and this help to avoid message from being generated.
如果“cannot allow new log” and “advanced to log sequence” 时间差不明显,可以直接忽略这警告,等待buffer的信息flush完成,这时候进程是会短暂的hang住;如果时间差太大,可以通过增加db_writer_processes 参数值解决。
原因分析:
当flush private strand或者commit时,Private strand被批量写入log文件中。如果新事务申请不到Private strand的redo allocation latch,则会继续遵循旧的redo buffer的redo allocation latch机制,申请写入shared strand中。如果新事务最终申请不到redo allocation latch,alter log里就会一直显示"Private strand flush not complete"。