35.2 PostgreSQL
Installing PostgreSQL
# pkg install postgresql18-server# cd /usr/ports/databases/postgresql18-server/
# make install clean# pkg info -D postgresql18-serverFile Structure
/
├── etc/
│ ├── login.conf # Login configuration file
│ ├── rc.conf # System startup configuration
│ └── passwd # User password file
├── usr/
│ ├── local/
│ │ ├── etc/
│ │ │ ├── rc.d/
│ │ │ │ └── postgresql # PostgreSQL startup script
│ │ │ └── periodic/
│ │ │ └── daily/
│ │ │ └── 502.pgsql # PostgreSQL scheduled backup script
│ │ ├── share/
│ │ │ └── postgresql/
│ │ │ └── odbc.sql # ODBC compatibility SQL script
│ │ └── bin/
│ │ └── pg_ctl # PostgreSQL control utility
│ └── ports/
│ └── databases/
│ └── postgresql18-server/ # PostgreSQL 18 Port
└── var/
└── db/
└── postgres/
├── data18/ # PostgreSQL 18 data directory
│ └── postgresql.conf # PostgreSQL configuration file
├── main/ # main instance data directory
└── dev/ # dev instance data directoryService Management
Initializing the Database
Logging In and Usage
PostgreSQL Service Management
Initialization Recommendations
Managing Multiple Database Instances (Clusters)
Configuring Instances
Initializing Instance Directories
Starting, Stopping, and Restarting
References
Last updated