Upgrading PostgreSQL Workflow
The following steps apply to both internal and external PostgreSQL and are the same for both Xray 2.x and 3.x.
Important Rules and Guidelines
- Upgrading the PostgreSQL for the Xray database requires downtime of Xray.
- Remember to back up your database before beginning the upgrade.
- Stop Xray services.
- Backup and upgrade the database.
- Upgrade an External PostgreSQL and select the link for your external PostgreSQL version.
- Start Xray services.
Upgrading an Internal PostgreSQL
If you are running the PostgreSQL bundled with the Xray installer, follow the steps below according to your installation type. There are several upgrade methods you can use for upgrading to PostgreSQL 12. Which method to use depends on your preferences.
The PostgreSQL upgrade steps below assume that the user is trying the upgrade from a PostgreSQL 9.x version to any higher version.
Docker Compose Installers
Upgrading an External PostgreSQL
If you are using an external PostgreSQL, you will need to upgrade according to the distribution of PostgreSQL you are using, and the official PostgreSQL documentation.
- Upgrading to PostgreSQL 12
- Upgrading to PostgreSQL 11
- Upgrading to PostgreSQL 10
- Upgrading to PostgreSQL 9.6 (not recommended)