当前位置:文档之家› PostGreSQL.配置和日常管理.

PostGreSQL.配置和日常管理.

4
Do you want to continue? [Y/n]: Y --------------------------------------------------------------------------Please wait while Setup installs PostgreSQL on your computer. Installing 0% ______________ 50% ______________ 100% ######################################### --------------------------------------------------------------------------Setup has finished installing PostgreSQL on your computer. Launch Stack Builder at exit? Stack Builder may be used to download and install additional tools, drivers and applications to complement your PostgreSQL installation. [Y/n]: Y
--------------------------------------------------------------------------Existing data directory
An existing data directory has been found at /usr/local/postgresql8/data set to use port 5432. This directory and it's configuration will be used for this installation. Press [Enter] to continue :
00:00:00 postgres: postgres circdb 00:00:00 postgres: postgres postgres 00:00:00 postgres: postgres circdb 00:00:00 postgres: postgres mydb
6
root 22122 21803 0 10:34 pts/3 00:00:00 su - postgres
库操作: -bash-3.00$ createdb mydb
Password: CREATE DATABASE
-bash-3.00$ psql mydb
Password: Welcome to psql 7.4.6, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit
3
一、安装
1、LINUX 版本安装
[root@server94 local]# ./postgresql-8.3.7-1-linux.bin
--------------------------------------------------------------------------Welcome to the PostgreSQL Setup Wizard. #delete obsolete and expired backup and archivelog
…… [538] zu_ZA [539] zu_ZA.iso88591 [540] zu_ZA.utf8 Please choose an option [1] :
--------------------------------------------------------------------------Setup is now ready to begin installing PostgreSQL on your computer.
配置环境变量: -bash-3.00$ more ~/.bash_profile
export PATH=/usr/local/postgresql8/bin:$PATH:. PGDATA=/var/lib/pgsql/data [ -f $PGDATA/../initdb.i18n ] && source $PGDATA/../initdb.i18n export PGDATA
00:00:00 postgres: wal 31 19526 0 11:45 ?
00:00:00 postgres: autovacuum launcher
process
postgres 19532 19526 0 11:45 ?
00:00:00 postgres: stats collector rocess
--------------------------------------------------------------------------Existing installation
An existing PostgreSQL installation has been found at /usr/local/postgresql8. This installation will be upgraded. Press [Enter] to continue :
00:01:27 postgres: postgres circdb
172.18.6.195(2154) SELECT
postgres 23494 25538 1 14:59 ?
00:00:45 postgres: postgres circdb
172.18.6.195(2602) SELECT
postgres 23759 25538 0 15:52 ?
2、日常管理 数据文件目录介绍: WAL:/usr/local/postgresql8/data/pg_xlog ARC:/usr/local/postgresql8/data/pg_xlog/arch* DATAF:/usr/local/postgresql8/data/base INIT:/usr/local/postgresql8/postgresql.conf
PostGreSQL.日常管理.eBao
i
历史记录
变更记录
日期
作者
2009-7-31 Lewise Liu
版本 1.0
INIT
变更说明
相关文档
发布日期
文档标题
审查者 版本
ii
目录
一、安装................................................................... 4 二、客户端配置 ............................................................ 13 三、ora2gp 转换工具 ....................................................... 14 四、CIRC 转换 ............................................................. 18 参考资料:................................................................ 33
postgres 19527 19526 0 11:45 ?
00:00:00 postgres: logger process
postgres 19529 19526 0 11:45 ?
00:00:00 postgres: writer process
postgres 19530 19526 0 11:45 ?
--------------------------------------------------------------------------Setup is now ready to begin installing PostgreSQL on your computer.
Do you want to continue? [Y/n]:
00:00:00 postgres: postgres circdb
172.18.6.195(2877) idle
可见:
1) PSQL 和 Oracle 一样,对于来自 JDBC 和 Client 端的每个访问,最终提供独立进程 处理。
2) 但 Oracle 通过 TNS 监听所有访问,PSQL 通过自身的 DAMON 守护进程提供。 3) PSQL 内部 transaction 以 PROCCESSID 标识,Oracle 通过 session 标识。
postgres 22123 22122 0 10:34 pts/3 00:00:00 -bash
postgres 22240 25538 0 10:46 ?
00:00:02 postgres: postgres mydb
172.18.6.195(1556) idle
postgres 22965 25538 0 13:11 ?
用户处理进程:
postgres 17578 25538 0 Aug02 ? 192.168.154.94(51379) idle postgres 21797 25538 0 09:36 ? 172.18.6.195(1299) idle postgres 21798 25538 0 09:36 ? 172.18.6.195(1300) idle postgres 22119 25538 0 10:34 ? 172.18.6.195(1516) idle
相关主题