You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Create release-notes-v16.9.md
initial commit
* updated ver nr and dates
updated version numbers and added release variable
* Update variables.yml
updated with date
* Updated rel notes link
For 16.8 and 16.9
* updated major-upgrade
Updated with a bit more feedback on the !!! important note, reworded it a bit.
* upgraded major steps
based on pg-1599, updated steps to upgrade major version On Debian and Ubuntu using `apt` topic
* Added documentation note
To the release notes regarding the new updated major upgrade chapter steps
* small fixes
small linting updates and added latest release note to index
* updated tarball with a precondition
Added additional precondition + set the correct date of release for 16.9
* small fix
fixed space and reworded based on feedback from Naeem
* date updates
date updates and release notes informing user they are based and built upon 16.8 release
This document describes the in-place upgrade of Percona Distribution for PostgreSQL using the `pg_upgrade` tool.
4
4
5
-
!!! important
5
+
To ensure a smooth upgrade path, follow these steps:
6
6
7
-
When running a major upgrade on **RHEL 8 and compatible derivatives**, consider the following:
8
-
9
-
Percona Distribution for PostgreSQL 16.3, 15.7, 14.12, 13.15 and 12.18 include `llvm` packages 16.0.6, while its previous versions 16.2, 15.6, 14.11, 13.14, and 12.17 include `llvm` 12.0.1. Since `llvm` libraries differ and are not compatible, the direct major version upgrade from 15.6 to 16.3 may cause issues.
7
+
* Upgrade to the latest minor version within your current major version (e.g., from 15.11 to 15.13).
8
+
* Then, perform the major upgrade to your desired version (e.g., from 15.13 to 16.9).
10
9
11
-
To ensure a smooth upgrade path, follow these steps:
10
+
!!! Note
11
+
When running a major upgrade for **RHEL 8 and compatible derivatives**, consider the following:
12
12
13
-
* Upgrade to the latest minor version within your current major version (e.g., from 15.6 to 15.7).
14
-
* Then, perform the major upgrade to your desired version (e.g., from 15.7 to 16.3).
13
+
Percona Distribution for PostgreSQL 16.3, 15.7, 14.12, 13.15 and 12.18 include `llvm` packages 16.0.6, while its previous versions 16.2, 15.6, 14.11, 13.14, and 12.17 include `llvm` 12.0.1. Since `llvm` libraries differ and are not compatible, the direct major version upgrade from 15.6 to 16.3 may cause issues.
15
14
16
15
The in-place upgrade means installing a new version without removing the old version and keeping the data files on the server.
17
16
@@ -58,17 +57,18 @@ Run **all** commands as root or via **sudo**:
58
57
59
58
1. Install Percona Distribution for PostgreSQL 16 packages.
60
59
60
+
!!! note
61
+
When installing version 16, if prompted via a pop-up to upgrade to the latest available version, select **No**.
61
62
62
63
*[Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html). If you have installed it before, [update it to the latest version](https://docs.percona.com/percona-software-repositories/updating.html)
63
-
64
-
* Enable Percona repository:
64
+
65
+
* Enable Percona repository
65
66
66
67
```{.bash data-prompt="$"}
67
68
$ sudo percona-release setup ppg-16
68
69
```
69
70
70
-
71
-
* Install Percona Distribution for PostgreSQL 16 package:
71
+
* Install Percona Distribution for PostgreSQL 16 package
72
72
73
73
```{.bash data-prompt="$"}
74
74
$ sudo apt install percona-postgresql-16
@@ -82,141 +82,150 @@ Run **all** commands as root or via **sudo**:
82
82
83
83
This stops both Percona Distribution for PostgreSQL 15 and 16.
84
84
85
-
86
85
3. Run the database upgrade.
87
86
87
+
* Log in as the `postgres` user
88
88
89
-
* Log in as the `postgres` user.
90
-
91
-
```{.bash data-prompt="$"}
92
-
$ sudo su postgres
93
-
```
94
-
95
-
96
-
* Change the current directory to the `tmp` directory where logs and some scripts will be recorded:
97
-
98
-
```{.bash data-prompt="$"}
99
-
$ cd tmp/
100
-
```
101
-
102
-
103
-
* Check the ability to upgrade Percona Distribution for PostgreSQL from 15 to 16:
The `--link` flag creates hard links to the files on the old version cluster so you don’t need to copy data.
153
-
154
-
If you don’t wish to use the `--link` option, make sure that you have enough disk space to store 2 copies of files for both old version and new version clusters.
155
-
156
-
157
-
* Go back to the regular user:
158
-
159
-
```{.bash data-prompt="$"}
160
-
$ exit
161
-
```
162
-
163
-
164
-
* The Percona Distribution forPostgreSQL 15 uses the `5432` port while the Percona Distribution for PostgreSQL 16 is set up to use the `5433` port by default. To start the Percona Distribution for PostgreSQL 15, swap portsin the configuration files of both versions.
165
-
166
-
```{.bash data-prompt="$"}
167
-
$ sudo vim /etc/postgresql/16/main/postgresql.conf
168
-
$ port = 5433 # Change to 5432 here
169
-
$ sudo vim /etc/postgresql/15/main/postgresql.conf
170
-
$ port = 5432 # Change to 5433 here
171
-
```
104
+
```bash
105
+
$ pg_upgradecluster 15 main
106
+
```
172
107
108
+
<details>
109
+
<summary>Sample output (click to expand)</summary>
110
+
```bash
111
+
Upgrading cluster 15/main to 16/main ...
112
+
Stopping old cluster...
113
+
Restarting old cluster with restricted connections...
114
+
...
115
+
Success. Please check that the upgraded cluster works. If it does,
116
+
you can remove the old cluster with:
117
+
pg_dropcluster 15 main
118
+
119
+
Ver Cluster Port Status Owner Data directory Log file
120
+
16 main 5432 online postgres /var/lib/postgresql/16/main /var/log/postgresql/postgresql-16-main.log
121
+
122
+
Sample output:
123
+
Upgrading cluster 15/main to 16/main ...
124
+
Stopping old cluster...
125
+
Restarting old cluster with restricted connections...
126
+
Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
Before deleting the old cluster, verify that the newly upgraded cluster is fully operational. Keeping the old cluster does not negatively affect the functionality or performance of your upgraded cluster.
201
217
202
-
7. Delete the old cluster's data files:
203
-
204
218
```{.bash data-prompt="$"}
205
-
$ ./delete_old_cluster.sh
206
-
$ sudo rm -rf /etc/postgresql/15/main
207
-
$ #Logout
208
-
$ exit
219
+
$ pg_dropcluster 15 main
209
220
```
210
221
211
-
212
222
## On Red Hat Enterprise Linux and CentOS using `yum`
213
223
214
224
Run **all** commands as root or via **sudo**:
215
225
{.power-number}
216
226
217
227
1. Install Percona Distribution for PostgreSQL 16 packages
* Check the ability to upgrade Percona Distribution for PostgreSQL from 15 to 16:
275
279
276
280
```{.bash data-prompt="$"}
@@ -304,7 +308,6 @@ Run **all** commands as root or via **sudo**:
304
308
*Clusters are compatible*
305
309
```
306
310
307
-
308
311
* Upgrade the Percona Distribution for PostgreSQL
309
312
310
313
```{.bash data-prompt="$"}
@@ -319,7 +322,6 @@ Run **all** commands as root or via **sudo**:
319
322
The `--link` flag creates hard links to the files on the old version cluster so you don’t need to copy data.
320
323
If you don’t wish to use the `--link` option, make sure that you have enough disk space to store 2 copies of files for both old version and new version clusters.
321
324
322
-
323
325
5. Start the `postgresql` 16 service.
324
326
325
327
```{.bash data-prompt="$"}
@@ -332,10 +334,8 @@ Run **all** commands as root or via **sudo**:
332
334
$ systemctl status postgresql-16
333
335
```
334
336
335
-
336
337
7. After the upgrade, the Optimizer statistics are not transferred to the new cluster. Run the `vaccumdb` command to analyze the new cluster:
337
338
338
-
339
339
* Log in as the postgres user
340
340
341
341
```{.bash data-prompt="$"}
@@ -348,14 +348,12 @@ Run **all** commands as root or via **sudo**:
0 commit comments