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
* Backport: Updated links + install/tarball docs (based on 0d46fe5, modified for v15)
* PG-1567-Release-notes-15.13
initial commit
* updated with changes to major upgrade and RN
Added major upgrade changes as per pg-1599, updated RN with note of the doc change and small variable addition for pending release date
* updated tarball commands
and updated date for dates variable release 02-June
* Update release-notes-v15.13.md
removed previous highlights and kept "based on 15.13"
* updated ver
updated table ver nr and cover page date
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:
7
+
* Upgrade to the latest minor version within your current major version (e.g., from 14.17 to 14.18).
8
+
* Then, perform the major upgrade to your desired version (e.g., from 14.18 to 15.13).
8
9
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.
10
+
!!! note
10
11
11
-
To ensure a smooth upgrade path, follow these steps:
12
-
13
-
* Upgrade to the latest minor version within your current major version (e.g., from 14.11 to 14.12).
14
-
* Then, perform the major upgrade to your desired version (e.g., from 14.12 to 15.7).
12
+
When running a major upgrade on **RHEL 8 and compatible derivatives**, consider the following:
15
13
14
+
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.
16
15
17
16
The in-place upgrade means installing a new version without removing the old version and keeping the data files on the server.
18
17
@@ -28,26 +27,19 @@ Similar to installing, we recommend you to upgrade Percona Distribution for Post
28
27
29
28
The general in-place upgrade flow for Percona Distribution for PostgreSQL is the following:
30
29
31
-
32
30
1. Install Percona Distribution for PostgreSQL 15 packages.
33
31
34
-
35
32
2. Stop the PostgreSQL service.
36
33
37
-
38
34
3. Check the upgrade without modifying the data.
39
35
40
-
41
36
4. Upgrade Percona Distribution for PostgreSQL.
42
37
43
-
44
38
5. Start PostgreSQL service.
45
39
46
-
47
40
6. Execute the **analyze_new_cluster.sh** script to generate statistics
48
41
so the system is usable.
49
42
50
-
51
43
7. Delete old packages and configuration files.
52
44
53
45
The exact steps may differ depending on the package manager of your operating system.
@@ -59,16 +51,18 @@ Run **all** commands as root or via **sudo**:
59
51
60
52
1. Install Percona Distribution for PostgreSQL 15 packages.
61
53
54
+
!!! note
55
+
When installing version 15, if prompted via a pop-up to upgrade to the latest available version, select **No**.
62
56
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)
64
-
65
-
* Enable Percona repository:
57
+
*[Install percona-release :octicons-link-external-15:](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)
58
+
59
+
* Enable Percona repository
66
60
67
61
```{.bash data-prompt="$"}
68
62
$ sudo percona-release setup ppg-15
69
63
```
70
64
71
-
* Install Percona Distribution for PostgreSQL 15 package:
65
+
* Install Percona Distribution for PostgreSQL 15 package
72
66
73
67
```{.bash data-prompt="$"}
74
68
$ sudo apt install percona-postgresql-15
@@ -82,152 +76,158 @@ Run **all** commands as root or via **sudo**:
82
76
83
77
This stops both Percona Distribution for PostgreSQL 14 and 15.
84
78
85
-
86
79
3. Run the database upgrade.
87
80
81
+
* Log in as the `postgres` user
88
82
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 14 to 15:
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
-
160
-
```{.bash data-prompt="$"}
161
-
$ exit
162
-
```
163
-
164
-
165
-
* The Percona Distribution forPostgreSQL 14 uses the `5432` port while the Percona Distribution for PostgreSQL 15 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.
166
-
167
-
```{.bash data-prompt="$"}
168
-
$ sudo vim /etc/postgresql/15/main/postgresql.conf
169
-
$ port = 5433 # Change to 5432 here
170
-
$ sudo vim /etc/postgresql/14/main/postgresql.conf
171
-
$ port = 5432 # Change to 5433 here
172
-
```
98
+
```{.bash data-prompt="$"}
99
+
$ pg_upgradecluster 14 main
100
+
```
173
101
102
+
<details>
103
+
<summary>Sample output (click to expand)</summary>
104
+
```bash
105
+
Upgrading cluster 14/main to 15/main ...
106
+
Stopping old cluster...
107
+
Restarting old cluster with restricted connections...
108
+
...
109
+
Success. Please check that the upgraded cluster works. If it does,
110
+
you can remove the old cluster with:
111
+
pg_dropcluster 14 main
112
+
113
+
Ver Cluster Port Status Owner Data directory Log file
114
+
15 main 5432 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log
115
+
116
+
Sample output:
117
+
Upgrading cluster 14/main to 15/main ...
118
+
Stopping old cluster...
119
+
Restarting old cluster with restricted connections...
120
+
Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
Success. Please check that the upgraded cluster works. If it does,
177
+
you can remove the old cluster with
178
+
pg_dropcluster 14 main
179
+
180
+
Ver Cluster Port Status Owner Data directory Log file
181
+
14 main 5433 down postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
182
+
Ver Cluster Port Status Owner Data directory Log file
183
+
15 main 5432 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log
184
+
```
185
+
</details>
174
186
175
187
4. Start the `postgreqsl` service.
176
188
177
189
```{.bash data-prompt="$"}
178
190
$ sudo systemctl start postgresql.service
179
191
```
180
192
181
-
182
193
5. Check the `postgresql` version.
183
194
184
195
* Log in as a postgres user
185
-
196
+
186
197
```{.bash data-prompt="$"}
187
198
$ sudo su postgres
188
199
```
189
200
190
201
* Check the database version
191
-
202
+
192
203
```{.bash data-prompt="$"}
193
204
$ psql -c "SELECT version();"
194
205
```
195
206
207
+
6. Delete the old cluster's data files.
196
208
197
-
6. After the upgrade, the Optimizer statistics are not transferred to the new cluster. Run the `vaccumdb`command to analyze the new cluster:
209
+
!!! note
210
+
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.
@@ -263,14 +263,12 @@ Run **all** commands as root or via **sudo**:
263
263
264
264
4. Run the database upgrade.
265
265
266
-
267
266
* Log in as the `postgres` user
268
267
269
268
```{.bash data-prompt="$"}
270
269
$ sudo su postgres
271
270
```
272
271
273
-
274
272
* Check the ability to upgrade Percona Distribution for PostgreSQL from 14 to 15:
275
273
276
274
```{.bash data-prompt="$"}
@@ -304,7 +302,6 @@ Run **all** commands as root or via **sudo**:
304
302
*Clusters are compatible*
305
303
```
306
304
307
-
308
305
* Upgrade the Percona Distribution for PostgreSQL
309
306
310
307
```{.bash data-prompt="$"}
@@ -319,7 +316,6 @@ Run **all** commands as root or via **sudo**:
319
316
The `--link` flag creates hard links to the files on the old version cluster so you don’t need to copy data.
320
317
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
318
322
-
323
319
5. Start the `postgresql` 15 service.
324
320
325
321
```{.bash data-prompt="$"}
@@ -332,10 +328,8 @@ Run **all** commands as root or via **sudo**:
332
328
$ systemctl status postgresql-15
333
329
```
334
330
335
-
336
331
7. After the upgrade, the Optimizer statistics are not transferred to the new cluster. Run the `vaccumdb` command to analyze the new cluster:
337
332
338
-
339
333
* Log in as the postgres user
340
334
341
335
```{.bash data-prompt="$"}
@@ -348,7 +342,6 @@ Run **all** commands as root or via **sudo**:
0 commit comments