postgresql14源码编译安装

初始化数据库

/u01/pginstall/pg14.13/bin/initdb -D /u01/pginstall/pg14.13/data

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 database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /u01/pginstall/pg14.13/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Asia/Shanghai
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
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:

    /u01/pginstall/pg14.13/bin/pg_ctl -D /u01/pginstall/pg14.13/data -l logfile start

[postgres@db01 data]$ ll
total 56
drwx------ 5 postgres postgres    41 Nov  1 11:47 base
drwx------ 2 postgres postgres  4096 Nov  1 11:47 global
drwx------ 2 postgres postgres     6 Nov  1 11:47 pg_commit_ts
drwx------ 2 postgres postgres     6 Nov  1 11:47 pg_dynshmem
-rw------- 1 postgres postgres  4789 Nov  1 11:47 pg_hba.conf
-rw------- 1 postgres postgres  1636 Nov  1 11:47 pg_ident.conf
drwx------ 4 postgres postgres    68 Nov  1 11:47 pg_logical
drwx------ 4 postgres postgres    36 Nov  1 11:47 pg_multixact
drwx------ 2 postgres postgres     6 Nov  1 11:47 pg_notify
drwx------ 2 postgres postgres     6 Nov  1 11:47 pg_replslot
drwx------ 2 postgres postgres     6 Nov  1 11:47 pg_serial
drwx------ 2 postgres postgres     6 Nov  1 11:47 pg_snapshots
drwx------ 2 postgres postgres     6 Nov  1 11:47 pg_stat
drwx------ 2 postgres postgres     6 Nov  1 11:47 pg_stat_tmp
drwx------ 2 postgres postgres    18 Nov  1 11:47 pg_subtrans
drwx------ 2 postgres postgres     6 Nov  1 11:47 pg_tblspc
drwx------ 2 postgres postgres     6 Nov  1 11:47 pg_twophase
-rw------- 1 postgres postgres     3 Nov  1 11:47 PG_VERSION
drwx------ 3 postgres postgres    60 Nov  1 11:47 pg_wal
drwx------ 2 postgres postgres    18 Nov  1 11:47 pg_xact
-rw------- 1 postgres postgres    88 Nov  1 11:47 postgresql.auto.conf
-rw------- 1 postgres postgres 28765 Nov  1 11:47 postgresql.conf
上一篇:leetcode-3-无重复字符的最长子串-题解:


下一篇:odrive代码阅读笔记