数据库稳定性 选型与去IOE

上传人:蜀歌 文档编号:146801390 上传时间:2020-10-04 格式:PDF 页数:42 大小:3.29MB
返回 下载 相关 举报
数据库稳定性 选型与去IOE_第1页
第1页 / 共42页
数据库稳定性 选型与去IOE_第2页
第2页 / 共42页
数据库稳定性 选型与去IOE_第3页
第3页 / 共42页
数据库稳定性 选型与去IOE_第4页
第4页 / 共42页
数据库稳定性 选型与去IOE_第5页
第5页 / 共42页
点击查看更多>>
资源描述

《数据库稳定性 选型与去IOE》由会员分享,可在线阅读,更多相关《数据库稳定性 选型与去IOE(42页珍藏版)》请在金锄头文库上搜索。

1、 Postgres Conference China 2015 中国用户大会 数据库稳定性,选型与去IOE 赵振平(zerocool) 太阳塔科技 Postgres Conference China 2015 中国用户大会 曾经是摩托罗拉(Motorola)云计算数据库部门负责人 太阳塔科技创始人 畅销书作者 电子工业出版社签约作者 出版了2本数据库著作Oracle数据库精讲与疑难解析 成功之路:Oracle 11g学习笔记。 Postgres Conference China 2015 中国用户大会 最贵的数据库图书(比国外大师的还贵) 2008年度计算机畅销书 电子工业出版社30周年优秀作

2、者 微信laohouzi999 赵振平赵振平 Postgres Conference China 2015 中国用户大会 Database Stability Postgres Conference China 2015 中国用户大会 Postgres Conference China 2015 中国用户大会 redo log buffer 与online redo log 工作原理 微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信

3、laohouzi999 Postgres Conference China 2015 中国用户大会 The redo records have all relevant metadata for the change, including the following: SCN and time stamp of the change Transaction ID of the transaction that generated the change SCN and time stamp when the transaction committed (if it committed) Type

4、 of operation that made the change Name and type of the modified data segment 微信laohouzi999 Postgres Conference China 2015 中国用户大会 n A user commits a transaction n An online redo log switch occurs. n Three seconds have passed since LGWR last wrote. n The redo log buffer is one-third full or contains

5、1 MB of buffered data. n DBW must write modified buffers to disk. 写日志的时机 微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信laohouzi999 Postgres Conference China 2015 中国用户大会 Oracle稳定的另外一个秘密 微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信laohouzi999 Postgres Conference China 2015 中国用户大会 IBM

6、 Power 750 微信laohouzi999 Postgres Conference China 2015 中国用户大会 IBM Power 750 微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信laohouzi999 18 Postgres Conference China 2015 中国用户大会 Oracle真的稳定吗 微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信laohouzi999 Postgres Conference China 2015 中国用户大会

7、微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信laohouzi999 Postgres Conference China 2015 中国用户大会 微信laohouzi999 Postgres Conference China

8、2015 中国用户大会 微信laohouzi999 Postgres Conference China 2015 中国用户大会 Postgres Conference China 2015 中国用户大会 数据字典 undo 表数据 索引数据 System Tablespace ibdata1 ibdata2 ibdata3 innodb_data_file_path innodb_undo_tablespaces0 (undo表空间的个数) (MySQL 5.6 and higher) innodb_undo_directory(指定undo文件存放的目录) undo00 1 undo00 1

9、 innodb_undo_logs (指定回滚段的个数) Postgres Conference China 2015 中国用户大会 innodb_log_files_in_group日志组中日 志的数量(文件的数量) ib_logfile 0 ib_logfile 2 ib_logfile 1 group1group2 group3 Postgres Conference China 2015 中国用户大会 Postgres Conference China 2015 中国用户大会 Postgres Conference China 2015 中国用户大会 Postgres Conferen

10、ce China 2015 中国用户大会 Postgres Conference China 2015 中国用户大会 Postgres Conference China 2015 中国用户大会 Transaction log (Write Ahead Log - WAL) 1. 每个WAL文件大小是16M,也可以进行调整 2. WAL文件放在pg_xlog目录中,这是数据目录的子目录 3. 每个WAL文件由PAGE组成,每个PAGE是8K 4. 每个文件都有序号,这些序号是不重复的 5. pg_xlog可以放到不同的目录,与数据文件所在的路径分开,这样可 以实现IO的分布 Postgres C

11、onference China 2015 中国用户大会 the server waits for the transactionsWAL records to be flushed to permanent storage before returning a success indication to the client Postgres Conference China 2015 中国用户大会 Each individual record in a WAL file is protected by a CRC-32 (32-bit) check that allows us to tel

12、l if record contents are correct. Postgres Conference China 2015 中国用户大会 1.多发生在早期版本 2.人工杀掉后台进程 3.删除PG的系统文件 4.内存耗尽 5.硬件失败 6.超长事务(事务未关闭) 7.太多连接 8.防火墙重启PG 9.磁盘空间满了(包括归档空间) 10.升级失败 11.UnixODBC库 12.在线重定义耗时太长(假死) PG宕机原因 Postgres Conference China 2015 中国用户大会 PG在crash后很容易恢复 Pg_resetxlog(WAL冲突) MOTO 100多台PG非常

13、稳定 PG宕机原因 1977: Larry Ellison, Bob Miner and Ed Oates 开 发oracle 1978: Oracle Version 1发布 1979: Oracle version 2发布 1983: Oracle version 3发布(并 用c语言 重写) 1984: Oracle version 4发布 1985: Oracle version 5发布 1986: Oracle 上市 . Oracle历史 41 1986 开 始研发 ( Professor Michael Stonebrak er) 1987 开 发出第一 个版本 1988 对 外展出 . 2015 . PostgreSQ L历史 42 1995 MySQL开发 成功(MySQL AB in Sweden) 2000 MySQL开源. 2008 SUN 公司收购 MySQL AB 2009 甲骨文 收购SUN公 司 . MySQL历 史

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 经营企划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号