标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-00742 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (103)
- 数据库 (1,716)
- DB2 (22)
- MySQL (74)
- Oracle (1,576)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (160)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (68)
- Oracle Bug (8)
- Oracle RAC (54)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (575)
- Oracle安装升级 (94)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (81)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (28)
- SQL Server恢复 (9)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- 不当使用_allow_resetlogs_corruption参数引起ORA-600 2662错误
- CSSD signal 11 in thread clssnmRcfgMgrThread故障处理
- 使用sid方式直接访问pdb(USE_SID_AS_SERVICE_LISTENER)
- ORA-00069: cannot acquire lock — table locks disabled for xxxx
- ORA-600 [4000] [a]相关bug
- sql server数据库“正在恢复”故障处理
- 如何判断数据文件是否处于begin backup状态
- CDM备份缺少归档打开数据库报ORA-600 kcbzib_kcrsds_1故障处理
- ORA-07445: exception encountered: core dump [expgod()+43] [IN_PAGE_ERROR]
- 2025年第一起ORA-600 16703故障恢复
- _gc_undo_affinity=FALSE触发ORA-01558
- public授权语句
- 中文环境显示AR8MSWIN1256(阿拉伯语字符集)
- 处理 Oracle 块损坏
- Oracle各种类型坏块说明和处理
- fio测试io,导致磁盘文件系统损坏故障恢复
- ORA-742 写丢失常见bug记录
- Oracle 19c 202501补丁(RUs+OJVM)-19.26
- 避免 19c 数据库性能问题需要考虑的事项 (Doc ID 3050476.1)
- Bug 21915719 Database hang or may fail to OPEN in 12c IBM AIX or HPUX Itanium – ORA-742, DEADLOCK or ORA-600 [kcrfrgv_nextlwn_scn] ORA-600 [krr_process_read_error_2]
标签归档:PostgreSQL编译
PostgreSQL 16 源码安装
空闲中尝试在linux 8的版本上,源码安装PostgreSQL 16,参考文章:PostgreSQL16.2源码部署教程
[root@xifenfei tmp]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.7 (Ootpa) [root@xifenfei tmp]# uname -osr Linux 5.15.0-3.60.5.1.el8uek.x86_64 GNU/Linux
下载pg源码程序:PostgreSQL 16源码下载
linux配置
--关闭selinux sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config setenforce 0 --安装相应的包 yum -y install readline readline-devel zlib zlib-devel gettext \ gettext-devel openssl openssl-devel pam pam-devel libxml2 \ libxml2-devel libxslt libxslt-devel perl perl-devel tcl-devel \ libuuid-devel gcc gcc-c++ make flex bison perl-ExtUtils* libicu libicu-devel --修改内核参数 cat>>/etc/sysctl.conf<<EOF fs.file-max = 76724200 kernel.sem = 10000 10240000 10000 1024 kernel.shmmni = 4096 kernel.shmall = 253702 kernel.shmmax = 1039163392 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.wmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_max = 1048576 fs.aio-max-nr = 40960000 vm.dirty_ratio=20 vm.dirty_background_ratio=3 vm.dirty_writeback_centisecs=100 vm.dirty_expire_centisecs=500 vm.swappiness=10 vm.min_free_kbytes=524288 vm.swappiness=0 vm.overcommit_memory=2 vm.overcommit_ratio=75 net.ipv4.ip_local_port_range = 10000 65535 EOF sysctl -p --创建组和用户 groupadd postgres -g 3000 useradd postgres -g 3000 -u 3000 --用户 limits 配置 cat>>/etc/security/limits.conf<<EOF postgres soft nofile 1048576 postgres hard nofile 1048576 postgres soft nproc 131072 postgres hard nproc 131072 postgres soft stack 10240 postgres hard stack 32768 postgres soft core 6291456 postgres hard core 6291456 EOF --创建相关目录和权限 mkdir -p /pg/database/server mkdir -p /pg/database/data mkdir -p /pg/database/wal mkdir -p /pg/database/archive chown -R postgres:postgres /pg -R chmod 0775 /pg chmod 0700 /pg/database/data --设置环境变量 vi /home/postgres/.bash_profile export PGPORT=5432 export PGUSER=postgres export PGHOME=/pg/database/server export PGDATA=/pg/database/data export PATH=$PGHOME/bin:$PATH --编译pg软件 su - postgres tar xzvf postgresql-16.2.tar.gz cd /tmp/postgresql-16.2 ./configure --prefix=/pg/database/server --with-pgport=5432 make make install --确认软件安装成功(检查编译日志和测试如下命令) [postgres@xifenfei ~]$ postgres --version postgres (PostgreSQL) 16.2
创建数据库
[postgres@xifenfei ~]$ /pg/database/server/bin/initdb -D/pg/database/data\ -X/pg/database/wal -EUTF8 -Upostgres -W The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default text search configuration will be set to "english". Data page checksums are disabled. Enter new superuser password: Enter it again: fixing permissions on existing directory /pg/database/data ... ok fixing permissions on existing directory /pg/database/wal ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... America/New_York creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling "trust" authentication for local connections initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: /pg/database/server/bin/pg_ctl -D /pg/database/data -l logfile start
启动数据库
[postgres@xifenfei ~]$ /pg/database/server/bin/pg_ctl -D /pg/database/data -l logfile start waiting for server to start.... done server started [postgres@xifenfei ~]$ psql psql (16.2) Type "help" for help. postgres=# \d pg_class Table "pg_catalog.pg_class" Column | Type | Collation | Nullable | Default ---------------------+--------------+-----------+----------+--------- oid | oid | | not null | relname | name | | not null | relnamespace | oid | | not null | reltype | oid | | not null | reloftype | oid | | not null | relowner | oid | | not null | relam | oid | | not null | relfilenode | oid | | not null | reltablespace | oid | | not null | relpages | integer | | not null | reltuples | real | | not null | relallvisible | integer | | not null | reltoastrelid | oid | | not null | relhasindex | boolean | | not null | relisshared | boolean | | not null | relpersistence | "char" | | not null | relkind | "char" | | not null | relnatts | smallint | | not null | relchecks | smallint | | not null | relhasrules | boolean | | not null | relhastriggers | boolean | | not null | relhassubclass | boolean | | not null | relrowsecurity | boolean | | not null | relforcerowsecurity | boolean | | not null | relispopulated | boolean | | not null | relreplident | "char" | | not null | relispartition | boolean | | not null | relrewrite | oid | | not null | relfrozenxid | xid | | not null | relminmxid | xid | | not null | relacl | aclitem[] | | | reloptions | text[] | C | | relpartbound | pg_node_tree | C | | Indexes: "pg_class_oid_index" PRIMARY KEY, btree (oid) "pg_class_relname_nsp_index" UNIQUE CONSTRAINT, btree (relname, relnamespace) "pg_class_tblspc_relfilenode_index" btree (reltablespace, relfilenode)
配置开机自动启动
[root@xifenfei tmp]# cp /tmp/postgresql-16.2/contrib/start-scripts/linux /etc/init.d/PostgreSQL [root@xifenfei tmp]# vi /etc/init.d/PostgreSQL --修改如下值 prefix=/pg/database/server PGDATA="/pg/database/data" [root@xifenfei tmp]# chkconfig --add PostgreSQL [root@xifenfei tmp]# chkconfig --list Note: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. If you want to list systemd services use 'systemctl list-unit-files'. To see services enabled on particular target use 'systemctl list-dependencies [target]'. PostgreSQL 0:off 1:off 2:on 3:on 4:on 5:on 6:off