数据库系统概论新技术篇55讲课件_第1页
数据库系统概论新技术篇55讲课件_第2页
数据库系统概论新技术篇55讲课件_第3页
数据库系统概论新技术篇55讲课件_第4页
数据库系统概论新技术篇55讲课件_第5页
免费预览已结束,剩余10页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、第8讲开源数据库系统8.1 概述8.2 PostgreSQL的学习、使用与定制8.3 PostgreSQL的主题分析An Introduction to Database System8.2PostgreSQL的学习、使用与定制8.2.1三步法可用于各种开源数据库的理解、掌握8.2.2总结An Introduction to Database System三步法v学习实例系统v多层次使用v做的“板凳”An Introduction to Database SystemStep1-学习实例系统vv理解代码树生成并安装系统=静态特征=了解进程结构运行并使用PG=动态特征=学习PG系统级开发的ABC

2、DEvvvAn Introduction to Database System代码结构backendaccessvPG (source Insight)bootstrapcatalogcommandsexecutorliblibpqmainnodesoptimizerparserpoportpostmasterregexrewritesnowballstoragetcoptsearchutilsAn Introduction to Database System<DIR><DIR><DIR><DIR>config contrib doc srcb

3、ackendbinincludeinterfacesmakefilesplporttemplatetesttimezonetoolstutorial代码模块示例服务器管理器-src/backend/postmaster/vnnnnnnn主nautovacuum.c bgwriter.c pgarch.c pgstat.c postmaster.c syslogger.c walwriter.c-src/backend/main/main.cvv系统实用工具-src/bin/nninitdb/initdb.cpg_ctl/pg_ctl.cAn Introduction to Database S

4、ystem生成+安装v阅读安装手册nPG的手册很详细 - 多个平台v简明安装步骤-Linux/Unix1.2.3.4.5.6.7.8.9.10.11.12./configuremakesumake install adduser postgresmkdir /usr/local/pgsql/datachown postgres /usr/local/pgsql/datasu - postgres/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data/usr/local/pgsql/bin/postgres -D /usr/local/pgsql

5、/data >logfile 2>&1 &/usr/local/pgsql/bin/createdb test/usr/local/pgsql/bin/psql testAn Introduction to Database System进程结构v 动态特征n1:1psqlapp1appkautovacuumlauncherstatisticscollectorbgwriter进程postmaster(postgres)walwritepostgrespostgrespostgresAn Introduction to Database System系统启动vpos

6、tgres opts1.2.3.4.保存环境变量设置本地化检查命令行参数 进入不同执行模式-boot:(bootstrap)初始化数据库-describe-config:显示系统配置-single:单用户模式执行<default>:启动多用户模式An Introduction to Database System数据库创建和初始化v 数据库初始化n initdbn bootstrap模式:postgres boot n BKI命令:share/postgres.bkiv 思想:如何从无到有An Introduction to Database System运行和维护-Client

7、Appv 数据库创建(fromTemplate)n createdb optsn createuser optsv 空间整理(GC)n vacuumdb optsv 数据导出/导入(backup)n pg_dump optsn pg_restore optsAn Introduction to Database System学习系统级开发的ABCDEA.B.C.设计多进程体系多模式运行-满足不同需求充分利用各种工具-sh/awk/perl/bison/flexD.可扩展性考虑E.源代码结构清晰An Introduction to Database SystemStep2-多层次使用v的教学用D

8、BMS(L1)概论的实习系统psql + pg-bennv开发使用数据库的应用系统(L2)nC/S或B/A/Sv个人代码仓库(codestore) (L3)nn典型数据结构-list/hash/queue算法案例-memcxt, dynahashAn Introduction to Database SystemStep3-做的“板凳”v 简单定制-不同选项的执行码eg. configure -enable-debugv高级定制-修改元数据表1.2.增加built-in 定义-eg. cur_role(某个.c文件)修改系统表-eg. pg_proc(catalog/pg_proc.h)v模块定制-扩展子系统eg. 增强管理器(smgr, storage manager)Magnet disk + SSD + flash + .An Introduction to

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论