Oracle Internals Notes Redo Write Triggers
There are four conditions that cause LGWR to perform a redo write.
- When LGWR is idle, it sleeps on an rdbms ipc message wait with a timeout of 3 seconds (as does DBWn). If this sleep times out and LGWR finds that there is some redo available to write, a background write is performed spontaneously.
- Whenever a process allocates space in the log buffer, the number of used log buffer blocks is calculated. If the number of used blocks is greater than or equal to the number of blocks specified by the _log_io_size parameter, and if LGWR is not already active, then LGWR is posted to perform a background write. The default value for _log_io_size is 1/3 of the log buffer expressed in log blocks, with an upper bound equivalent to 1 Mb from release 8.0. As with many other hidden parameters, unless set explicitly, the _log_io_size parameter reports as zero in X$KSPPSV.
- When a transaction commits, it generates a commit marker in the redo stream. However, the transaction is not recoverable until the log block containing that commit marker has been flushed to disk. So, before the process finishing the transaction can return a response to the user, it must wait for LGWR to flush that log block to disk. The process therefore posts LGWR and then sleeps on a log file sync wait with a timeout of 1 second. For completeness, the _wait_for_sync parameter can be set to FALSE to avoid waiting for redo to be synced, but doing so voids any guarantee of recoverability for committed transactions upon instance failure.
Note that commits within recursive calls (such as procedural code execute calls) do not need to sync their redo until a response is about to be returned to the user. Therefore recursive calls just sync the commit RBA of their most recent COMMIT upon return to the user call. They do not sync each commit.
An SGA variable (kcrfshsb, according to bug 182447) is used to communicate the log block number up to which the redo thread needs to be synced. If several commits occur in distinct transactions before LGWR wakes up, this variable records the highest log block number that needs to be synced, and the commit markers are all flushed to disk in a single redo write. This is sometimes called a group commit.
- When DBWn needs to write one or more blocks for which the high RBA is beyond LGWR's on-disk RBA, from Oracle 8i, it places those blocks into its deferred write queue and posts LGWR to sync the highest high RBA, but it does not wait. Instead DBWn continues to process other writes that do not need to be deferred. Prior to release 8i, DBWn used to sleep on a log file sync wait in this case.
Oracle Internals Notes Redo Write Triggers的更多相关文章
- Oracle Internals 相关站点
http://oracle-internals.com/blog/links/ http://coll15.mapyourshow.com/6_0/sessions/session-details.c ...
- Oracle Dataguard Standby Redo Log的两个实验
在Data Guard环境中,Standby Redo Log是一个比较特殊的日志类型.从最新的DG安装指导中,都推荐在Primary和Standby端,都配置Standby Redo Log. 简单 ...
- ORACLE STUDY NOTES 01
[JSU]LJDragon's Oracle course notes In the first semester, junior year DML数据操纵语言 DML指:update,delete, ...
- ORACLE STUDY NOTES 02
[JSU]LJDragon's Oracle course notes In the first semester, junior year I.用户和权限 1.用户操作 --创建新用户 CREATE ...
- Oracle logminer 分析redo log(TOAD与PLSQL)
Oracle logminer 分析redo log Oracle 11g r2 RAC centos 6.5 设置时间格式 select to_char(sysdate,'yyyy-mm-dd hh ...
- Oracle 11g的Redo Log和Archive Log的分析方法
自Oracle 11g起,无需设置UTL_FILE_DIR就可以使用LOGMNR对本地数据库的日志进行分析,以下是使用LOGMNR的DICT_FROM_ONLINE_CATALOG分析REDO和归档日 ...
- Oracle Metalink Notes Collection
INV Note 123456.1 Latest 11i Applications Recommended Patch List Note 568012.1:FAQ: Inventory Standa ...
- oracle(十二)redo 与 undo
1.undo:回滚未提交的事务.未提交前,内存不够用时,DBWR将脏数据写入数据文件中,以腾出内存空间. 这就是undo存在的原因. redo:恢复所有已提交的事务 2.实例失败(如主机掉电)可能出现 ...
- Oracle重做日志REDO
什么是重做? 重做日志包含所有数据产生的历史改变记录. 重做日志目的是保证数据的安全,如果数据因特殊原因没有写到磁盘上,可以通过重做日志来恢复. 重做日志文件通常用于 恢复(实例恢复和介质恢复) 日志 ...
随机推荐
- Java 静态static 关键字作用
静态的方法1.可以通过类名打点访问2.不能使用this关键字3.不能访问非静态的属性和方法 /* * 静态的方法: * 1.属于类的方法,可以通过类名打点访问 * 2.方法中不能使用this关键字 * ...
- git使用,Git的skil-map,git配置http/https/socks5代理
. 检出.克隆库: git clone git://git.openwrt.org/openwrt.git 2. git查看某个文件的修改历史 git log --pretty=oneline 文件名 ...
- 微信小程序image组件
image组件:是小程序专门针对图片的组件,功能强大 image组件的属性: src:类型 字符串 图片资源的路径 mode:类型 字符串 图片裁剪缩放模式 lazy-load:类型 布尔 图片的懒加 ...
- linux 杀掉僵尸进程 (zombie process, defunct)
本文说明为什么会出现僵尸进程 (zombie process, defunct),以及如何杀掉僵尸进程 1. 为什么有僵尸进程 僵尸进程出现在父进程没有回收子进程的 PCB 的时候,这个时候子进程已经 ...
- Illegal modifier for parameter *** , only final is permitted”
大家好,我想在main函数中定义一个public变量,系统报错说“Illegal modifier for parameter chatRoom, only final is permitted”,如 ...
- 监听整个页面上的DOM树变化
在线预览 方法 使用<Web API 接口>的<MutationObserver> MutationObserver 网上查到的很多都是使用Mutation events的,但 ...
- Jmeter响应中中文乱码怎么解决?
在jmeter的bin目录下有一个jmeter.properties的文件,打开它,搜索sampleresult.default.encoding,把它的注释打开,也就是把最前面的#去掉,改成samp ...
- UI自动化之日志的处理
写自动化时,我们常常希望打印出浏览器的操作记录,也同时希望报错的记录能够保留并用于问题的排查,这时候可以用到loggging模块 目录 1.logging文件 2.调用日志 1.logging文件 # ...
- cmd 编码修改。 牛阿。 解决问题
http://jingyan.baidu.com/article/e75aca85440f01142edac636.html 命令窗口修改编码,CMD编码修改方法 听语音 | 浏览:9696 | 更新 ...
- PMBOK
项目章程的内容1. 基于项目干系人的需求和期望提出的要求.2. 项目必须满足的业务要求或产品需求.3. 项目的目的或项目立项的理由.4. 委派的项目经理及项目经理的权限级别.5. 概要的里程碑进度计划 ...