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
Copy file name to clipboardExpand all lines: docs/how-to/refresh/index.md
+24-15Lines changed: 24 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,38 @@
1
1
# Refresh (upgrade)
2
2
3
-
A charm **refresh** is any change to the version of a charm, and/or its {term}`workload`.
3
+
Charmed PostgreSQL supports minor {term}`in-place` {term}`refresh` via the [`juju refresh`](https://documentation.ubuntu.com/juju/3.6/reference/juju-cli/list-of-juju-cli-commands/refresh/#details) command.
4
4
5
-
Charmed PostgreSQL supports minor in-place {term}`upgrades <upgrade>` via the [`juju refresh`](https://documentation.ubuntu.com/juju/3.6/reference/juju-cli/list-of-juju-cli-commands/refresh/#details) command.
5
+
```{admonition} Emergency stop button
6
+
:class: attention
7
+
Use `juju config appname pause-after-unit-refresh=all` to halt an in-progress refresh
8
+
```
6
9
7
-
## Supported refresh types
10
+
## Supported refreshes
8
11
9
-
This charm **can only be upgraded to a higher version**. It cannot be {term}`downgraded <downgrade>` to a lower version.
12
+
**Minor in-place {term}`upgrade`** between stable releases.
13
+
E.g. PostgreSQL 16.9 is upgraded to 16.10
10
14
11
-
The charm version can only be lowered in the case of an ongoing refresh that needs to {term}`roll back <rollback>` to its {term}`original version` due to a failure.
15
+
> See [How to perform a minor upgrade](/how-to/refresh/minor-upgrade)
12
16
13
-
```{seealso}
14
-
* [How to perform a minor upgrade](/how-to/refresh/minor-upgrade)
15
-
* [How to perform a minor rollback](/how-to/refresh/minor-rollback)
16
-
```
17
+
**Minor in-place {term}`rollback`** between stable releases.
18
+
E.g. An upgrade from PostgreSQL 16.9 -> 16.10 fails, so a rollback is triggered to take all units from 16.10 back to 16.9.
17
19
18
-
## Supported versions
20
+
> See [How to perform a minor rollback](/how-to/refresh/minor-rollback)
19
21
20
-
This charm **only supports minor version upgrades**, e.g. 16.9 --> 16.10.
22
+
<!-- TODO: Add when new stable: * Minor in-place upgrade from Revision X to Y -->
21
23
22
-
[Contact us](/reference/contacts) if you want to migrate from Charmed PostgreSQL 14 to 16
24
+
Check all available Charmed PostgreSQL 16 versions in [](/reference/releases).
25
+
26
+
## Non-supported refreshes
27
+
* Minor in-place {term}`downgrade` from PostgreSQL 16.10 to 16.9
28
+
* Major in-place {term}`upgrade` from PostgreSQL 14 to 16
29
+
* Major in-place {term}`downgrade` from PostgreSQL 16 to 14
30
+
* Any refresh involving non-stable versions (e.g. 16/edge)
31
+
32
+
The actions listed above must be performed as {term}`out of place` upgrades.
33
+
34
+
<!--TODO: When ready, point to 14-16 migration guide -->
Copy file name to clipboardExpand all lines: docs/how-to/refresh/minor-rollback.md
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,6 @@ After running `juju refresh`, if there are any version incompatibilities in char
4
4
5
5
Even if the underlying PostgreSQL cluster continues to work, it’s important to roll back the charm to the {term}`original version` so that an update can be attempted after further inspection of the failure.
6
6
7
-
```{attention}
8
-
Only trigger a rollback if the refresh has explicitly failed and cannot continue. Do not initiate a rollback while the refresh process is still running.
Copy file name to clipboardExpand all lines: docs/how-to/refresh/minor-upgrade.md
+17-25Lines changed: 17 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,40 +1,39 @@
1
1
# Perform a minor upgrade
2
2
3
-
A minor upgrade is a {term}`refresh` from one workload version to a higher one within the same major version (e.g. PostgreSQL 14.12 --> PostgreSQL 14.15)
4
-
5
-
The refresh process boils down to:
6
-
* Running a pre-refresh check to ensure your deployment can undergo a safe upgrade process
7
-
* Running the refresh command to initiate the process
8
-
* Monitoring and following UI instructions
3
+
A minor {term}`in-place` {term}`upgrade` is a {term}`refresh` from one {term}`workload` version to a higher one, within the same major version (e.g. PostgreSQL 14.12 --> PostgreSQL 14.15)
9
4
10
5
Once in the refresh is in progress, the UI will clearly indicate what is happening to each unit, and what actions are required from the user to continue the process or roll back in case of a problem.
11
6
7
+
If your upgrade has failed, see [How to perform a minor rollback](/how-to/refresh/minor-rollback)
8
+
12
9
```{seealso}
13
-
* [How to perform a minor rollback](/how-to/refresh/minor-rollback)
10
+
14
11
* [All Charmed PostgreSQL minor versions](/reference/releases)
15
-
* [](/how-to/back-up-and-restore/create-a-backup)
16
12
* [Developer docs for charm-refresh](https://canonical-charm-refresh.readthedocs-hosted.com/latest/)
Below are some strongly recommended precautions before refreshing to ensure minimal service disruption:
24
19
25
20
**Make sure to have a [backup](/how-to/back-up-and-restore/create-a-backup) of your data.**
26
21
27
-
**Do not perform operations that modify your cluster while refreshing.**
22
+
We recommend testing the integrity of your backup by performing a test [restore](/how-to/back-up-and-restore/restore-a-backup).
23
+
24
+
**Avoid operations that modify your cluster while refreshing.**
28
25
29
26
Concurrency with other operations is not supported, and it can lead the cluster to inconsistent states.
30
27
31
28
```{dropdown} Examples
32
29
Avoid operations such as (but not limited to) the following:
33
30
34
-
* Adding or removing units
31
+
* Adding or removing units - unless it is necessary for recovery
35
32
* Creating or destroying new relations
36
33
* Changes in workload configuration
37
34
* Upgrading other connected/related/integrated applications simultaneously
35
+
36
+
[Contact us](/reference/contacts) if you have questions about performing operations during refresh.
38
37
```
39
38
40
39
**Integrate with [Charmed PgBouncer](https://charmhub.io/pgbouncer).**
@@ -44,9 +43,7 @@ This will ensure minimal service disruption, if any.
44
43
(pre-refresh-check)=
45
44
## Pre-refresh check
46
45
47
-
The `pre-refresh-check` action checks that a refresh is possible and will switch the primary, if necessary, for a safe upgrade process.
48
-
49
-
This check happens automatically when you run `juju refresh`, but we recommend running it manually before scheduling a maintenance window for the refresh operation.
46
+
The [`pre-refresh-check`](https://canonical-charm-refresh.readthedocs-hosted.com/latest/user-experience/actions/#pre-refresh-check) action checks that the application is healthy and ready to refresh (e.g. no other operations are running).
50
47
51
48
Run a pre-refresh check against the leader unit:
52
49
@@ -62,26 +59,21 @@ Copy down the rollback command from the action output in case a rollback is need
62
59
63
60
## Initiate refresh
64
61
65
-
The following command will refresh the charm to the latest version in the channel you originally deployed your application from, e.g. `16/stable`:
62
+
The following command will refresh the charm to the latest version in the channel you originally deployed your application from:
66
63
67
64
```shell
68
65
juju refresh postgresql
69
66
```
70
67
71
-
To refresh your charm to the latest version of a specific channel or track, use the `--channel` flag. For example:
72
-
73
-
```shell
74
-
juju refresh postgresql --channel 16/edge
75
-
```
68
+
It is expected for the Juju agents to enter a temporary `failed` state.
76
69
77
-
Units will be refreshed one by one based on role: first the `replica` units, then `sync-standby`, and lastly the `leader` unit.
70
+
Units will then be refreshed one by one based on role:
71
+
1.`replica` units
72
+
2.`sync-standby`
73
+
3.`leader` unit.
78
74
79
75
If there are any version incompatibilities in charm revisions, dependencies, or any other unexpected failure in the upgrade process, the process will halt and enter a failure state.
80
76
81
-
```{attention}
82
-
Only trigger a rollback if the refresh has explicitly failed and cannot continue. <!--TODO: examples + clarify if you can rollback when refresh is healthy but paused waiting for resume-refresh -->
83
-
```
84
-
85
77
## Resume refresh
86
78
87
79
If the [`pause_after_unit_refresh`](https://charmhub.io/postgresql/configurations?channel=16/edge#pause_after_unit_refresh) config option on your PostgreSQL application is set to `first` (default) or `all`, you'll need to monitor and manually resume the refresh when one or more units have finished refreshing individually.
Charmed PostgreSQL 16 supports all [features listed in PostgreSQL 14](https://canonical-charmed-postgresql.readthedocs-hosted.com/14/reference/releases/#dependencies-and-supported-features).
@@ -6,25 +10,22 @@ Charmed PostgreSQL 16 supports all [features listed in PostgreSQL 14](https://ca
6
10
|:---:|:---:|:---:|
7
11
|[843, 844]| 16.9 | 3.6+ |
8
12
9
-
To learn more about the different release tracks and channels, see the [Juju documentation about channels](https://documentation.ubuntu.com/juju/3.6/reference/charm/#risk).
13
+
See all release notes on [GitHub](https://github.com/canonical/postgresql-operator/releases).
14
+
15
+
## How to refresh (upgrade)
16
+
17
+
Charmed PostgreSQL supports **minor in-place upgrades**. See [](/how-to/refresh/index) for more information.
10
18
11
-
To see all releases and commits, check the [Charmed PostgreSQL Releases page on GitHub](https://github.com/canonical/postgresql-operator/releases).
19
+
[Contact us](/reference/contacts) if you are interested in migrating from PostgreSQL 14 to 16.
12
20
13
21
## Architecture and base
14
22
15
23
Several [revisions](https://documentation.ubuntu.com/juju/3.6/reference/charm/#charm-revision) are released simultaneously for different [bases/series](https://juju.is/docs/juju/base) using the same charm code. In other words, one release contains multiple revisions.
16
24
17
25
If you do not specify a revision on deploy time, Juju will automatically choose the revision that matches your base and architecture.
18
26
19
-
```{caution}
20
-
If you deploy with the `--revision` flag, **you must make sure the revision matches your base and architecture**.
21
-
22
-
Check the tables below, or use [`juju info`](https://juju.is/docs/juju/juju-info).
23
-
```
24
-
25
-
## Plugins/extensions
27
+
<!--TODO: Move to explanation -->
26
28
27
-
For a list of all plugins supported for each revision, see the reference page [Plugins/extensions](/reference/plugins-extensions).
0 commit comments