PostgreSQL安装
CFLAGS=-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 ./configure --prefix=/home/pg96/pg9.6.2/pgdir --without-readline --without-zlib --enable-thread-safety --enable-rpath --enable-cassert --enable-debug CFLAGS='-03' --with-wal-segsize=64
./configure --prefix=/u01/postgres make sudomake install adduser postgres mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres export PGDATA=/usr/local/pgsql/data initdb -D $PGDATA postgres -D $PGDATA >logfile 2>&1 & 或 pg_ctl start -d$PGDATA -l pg_server.log createdb test pg_ctl -D $PGDATA start pg_ctl stop -o SIGTERM SIGINT,SIGQUIT,SIGKILL psql test psql -d postgres -p 5432 -U benchmarksql -h 192.168.2.1 # CREATE USER benchmarksql WITH ENCRYPTED PASSWORD 'benchmarksql'; # CREATE DATABASE benchmarksql OWNER benchmarksql; # select * from pg_database; # vacuum full; # vacuum analyze; # checkpoint
l database d table di index du user show 选项
http://www.52php.cn/article/p-ctolbgzm-pb.html
postgresql.conf
fsync=on synchronous_commit=on #wal_sync_method=fsync max_connections=800 shared_buffers=100GB max_wal_size=16GB work_mem=128MB full_page_writes=on checkpoint_segments=1024 checkpoint_timeout=60min bgwriter_delay=20ms commit_delay=10 autovacuum=on
http://www.52php.cn/article/p-mteekzer-ka.html (编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|