Skip to content

Commit 8296ef3

Browse files
committed
(wip) apply some feedback
1 parent faa9e99 commit 8296ef3

File tree

5 files changed

+58
-56
lines changed

5 files changed

+58
-56
lines changed

docs/how-to/refresh/index.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
11
# Refresh (upgrade)
22

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.
44

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+
```
69

7-
## Supported refresh types
10+
## Supported refreshes
811

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
1014

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)
1216
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.
1719

18-
## Supported versions
20+
> See [How to perform a minor rollback](/how-to/refresh/minor-rollback)
1921
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 -->
2123

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 -->
2335

24-
```{seealso}
25-
* [Charmed PostgreSQL 16 versions](/reference/releases)
26-
```
2736

2837
```{toctree}
2938
:titlesonly:

docs/how-to/refresh/minor-rollback.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ After running `juju refresh`, if there are any version incompatibilities in char
44

55
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.
66

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.
9-
10-
<!--TODO: examples-->
11-
```
12-
137
---
148

159
## Initiate rollback

docs/how-to/refresh/minor-upgrade.md

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
11
# Perform a minor upgrade
22

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)
94

105
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.
116

7+
If your upgrade has failed, see [How to perform a minor rollback](/how-to/refresh/minor-rollback)
8+
129
```{seealso}
13-
* [How to perform a minor rollback](/how-to/refresh/minor-rollback)
10+
1411
* [All Charmed PostgreSQL minor versions](/reference/releases)
15-
* [](/how-to/back-up-and-restore/create-a-backup)
1612
* [Developer docs for charm-refresh](https://canonical-charm-refresh.readthedocs-hosted.com/latest/)
1713
* [`pause_after_unit_refresh` documentation](https://canonical-charm-refresh.readthedocs-hosted.com/latest/user-experience/config/#pause-after-unit-refresh)
1814
```
1915

20-
2116
## Precautions
2217

2318
Below are some strongly recommended precautions before refreshing to ensure minimal service disruption:
2419

2520
**Make sure to have a [backup](/how-to/back-up-and-restore/create-a-backup) of your data.**
2621

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.**
2825

2926
Concurrency with other operations is not supported, and it can lead the cluster to inconsistent states.
3027

3128
```{dropdown} Examples
3229
Avoid operations such as (but not limited to) the following:
3330
34-
* Adding or removing units
31+
* Adding or removing units - unless it is necessary for recovery
3532
* Creating or destroying new relations
3633
* Changes in workload configuration
3734
* Upgrading other connected/related/integrated applications simultaneously
35+
36+
[Contact us](/reference/contacts) if you have questions about performing operations during refresh.
3837
```
3938

4039
**Integrate with [Charmed PgBouncer](https://charmhub.io/pgbouncer).**
@@ -44,9 +43,7 @@ This will ensure minimal service disruption, if any.
4443
(pre-refresh-check)=
4544
## Pre-refresh check
4645

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).
5047

5148
Run a pre-refresh check against the leader unit:
5249

@@ -62,26 +59,21 @@ Copy down the rollback command from the action output in case a rollback is need
6259

6360
## Initiate refresh
6461

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:
6663

6764
```shell
6865
juju refresh postgresql
6966
```
7067

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.
7669

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.
7874

7975
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.
8076

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-
8577
## Resume refresh
8678

8779
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.

docs/reference/glossary.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ workload
2828
2929
original version
3030
Workload and/or charm version of all units before initiating a refresh process
31+
32+
in-place
33+
TODO
34+
35+
out-of-place
36+
<!-- https://canonical-charm-refresh.readthedocs-hosted.com/latest/add-to-charm/is-this-for-you/ -->
3137
```

docs/reference/releases.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
relatedlinks: "[Charm&#32risk](https://documentation.ubuntu.com/juju/3.6/reference/charm/#risk)"
3+
---
4+
15
# Releases
26

37
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
610
|:---:|:---:|:---:|
711
| [843, 844] | 16.9 | 3.6+ |
812

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.
1018

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.
1220

1321
## Architecture and base
1422

1523
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.
1624

1725
If you do not specify a revision on deploy time, Juju will automatically choose the revision that matches your base and architecture.
1826

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 -->
2628

27-
For a list of all plugins supported for each revision, see the reference page [Plugins/extensions](/reference/plugins-extensions).
2829

2930
<!-- LINKS -->
3031
[843, 844]: https://github.com/canonical/postgresql-operator/releases/tag/v16%2F1.59.0

0 commit comments

Comments
 (0)