Skip to content

Commit e773fe8

Browse files
committed
Do not claim nor test that upgrade works where it does not
1 parent cfdc680 commit e773fe8

File tree

6 files changed

+5
-147
lines changed
  • 10/root/usr/share/container-scripts/postgresql
  • 12/root/usr/share/container-scripts/postgresql
  • 13/root/usr/share/container-scripts/postgresql
  • 15/root/usr/share/container-scripts/postgresql
  • src/root/usr/share/container-scripts/postgresql
  • test

6 files changed

+5
-147
lines changed

10/root/usr/share/container-scripts/postgresql/README.md

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -208,42 +208,6 @@ container starts it will reset the passwords to the values stored in the
208208
environment variables.
209209

210210

211-
Upgrading database (by switching to newer PostgreSQL image version)
212-
-------------------------------------------------------------------
213-
214-
** Warning! Please, before you decide to do the data directory upgrade, always
215-
ensure that you've carefully backed up all your data and that you are OK with
216-
potential manual rollback! **
217-
218-
This image supports automatic upgrade of data directory created by
219-
the PostgreSQL server version 9.6 (and _only_ this version) - provided by sclorg
220-
image. The upgrade process is designed so that you should be able to just
221-
switch from *image A* to *image B*, and set the `$POSTGRESQL_UPGRADE` variable
222-
appropriately to explicitly request the database data transformation.
223-
224-
The upgrade process is internally implemented via `pg_upgrade` binary, and for
225-
that purpose the container needs to contain two versions of PostgreSQL server
226-
(have a look at `man pg_upgrade` for more info).
227-
228-
For the `pg_upgrade` process - and the new server version, we need to initialize
229-
a brand new data directory. That's data directory is created automatically by
230-
container tooling under /var/lib/pgsql/data, which is usually external
231-
bind-mountpoint. The `pg_upgrade` execution is then similar to dump&restore
232-
approach -- it starts both old and new PostgreSQL servers (within container) and
233-
"dumps" the old datadir while and at the same time it "restores" it into new
234-
datadir. This operation requires a lot of data files copying, so you can decide
235-
what type of upgrade you'll do by setting `$POSTGRESQL_UPGRADE` appropriately:
236-
237-
**`copy`**
238-
The data files are copied from old datadir to new datadir. This option has low risk of data loss in case of some upgrade failure.
239-
240-
**`hardlink`**
241-
Data files are hard-linked from old to the new data directory, which brings performance optimization - but the old directory becomes unusable, even in case of failure.
242-
243-
244-
Note that because we copy data directory, you need to make sure that you have
245-
enough space for the copy; upgrade failure because of not enough space might
246-
lead to data loss.
247211

248212

249213
Extending image

12/root/usr/share/container-scripts/postgresql/README.md

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -208,42 +208,6 @@ container starts it will reset the passwords to the values stored in the
208208
environment variables.
209209

210210

211-
Upgrading database (by switching to newer PostgreSQL image version)
212-
-------------------------------------------------------------------
213-
214-
** Warning! Please, before you decide to do the data directory upgrade, always
215-
ensure that you've carefully backed up all your data and that you are OK with
216-
potential manual rollback! **
217-
218-
This image supports automatic upgrade of data directory created by
219-
the PostgreSQL server version 10 (and _only_ this version) - provided by sclorg
220-
image. The upgrade process is designed so that you should be able to just
221-
switch from *image A* to *image B*, and set the `$POSTGRESQL_UPGRADE` variable
222-
appropriately to explicitly request the database data transformation.
223-
224-
The upgrade process is internally implemented via `pg_upgrade` binary, and for
225-
that purpose the container needs to contain two versions of PostgreSQL server
226-
(have a look at `man pg_upgrade` for more info).
227-
228-
For the `pg_upgrade` process - and the new server version, we need to initialize
229-
a brand new data directory. That's data directory is created automatically by
230-
container tooling under /var/lib/pgsql/data, which is usually external
231-
bind-mountpoint. The `pg_upgrade` execution is then similar to dump&restore
232-
approach -- it starts both old and new PostgreSQL servers (within container) and
233-
"dumps" the old datadir while and at the same time it "restores" it into new
234-
datadir. This operation requires a lot of data files copying, so you can decide
235-
what type of upgrade you'll do by setting `$POSTGRESQL_UPGRADE` appropriately:
236-
237-
**`copy`**
238-
The data files are copied from old datadir to new datadir. This option has low risk of data loss in case of some upgrade failure.
239-
240-
**`hardlink`**
241-
Data files are hard-linked from old to the new data directory, which brings performance optimization - but the old directory becomes unusable, even in case of failure.
242-
243-
244-
Note that because we copy data directory, you need to make sure that you have
245-
enough space for the copy; upgrade failure because of not enough space might
246-
lead to data loss.
247211

248212

249213
Extending image

13/root/usr/share/container-scripts/postgresql/README.md

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -208,42 +208,6 @@ container starts it will reset the passwords to the values stored in the
208208
environment variables.
209209

210210

211-
Upgrading database (by switching to newer PostgreSQL image version)
212-
-------------------------------------------------------------------
213-
214-
** Warning! Please, before you decide to do the data directory upgrade, always
215-
ensure that you've carefully backed up all your data and that you are OK with
216-
potential manual rollback! **
217-
218-
This image supports automatic upgrade of data directory created by
219-
the PostgreSQL server version 12 (and _only_ this version) - provided by sclorg
220-
image. The upgrade process is designed so that you should be able to just
221-
switch from *image A* to *image B*, and set the `$POSTGRESQL_UPGRADE` variable
222-
appropriately to explicitly request the database data transformation.
223-
224-
The upgrade process is internally implemented via `pg_upgrade` binary, and for
225-
that purpose the container needs to contain two versions of PostgreSQL server
226-
(have a look at `man pg_upgrade` for more info).
227-
228-
For the `pg_upgrade` process - and the new server version, we need to initialize
229-
a brand new data directory. That's data directory is created automatically by
230-
container tooling under /var/lib/pgsql/data, which is usually external
231-
bind-mountpoint. The `pg_upgrade` execution is then similar to dump&restore
232-
approach -- it starts both old and new PostgreSQL servers (within container) and
233-
"dumps" the old datadir while and at the same time it "restores" it into new
234-
datadir. This operation requires a lot of data files copying, so you can decide
235-
what type of upgrade you'll do by setting `$POSTGRESQL_UPGRADE` appropriately:
236-
237-
**`copy`**
238-
The data files are copied from old datadir to new datadir. This option has low risk of data loss in case of some upgrade failure.
239-
240-
**`hardlink`**
241-
Data files are hard-linked from old to the new data directory, which brings performance optimization - but the old directory becomes unusable, even in case of failure.
242-
243-
244-
Note that because we copy data directory, you need to make sure that you have
245-
enough space for the copy; upgrade failure because of not enough space might
246-
lead to data loss.
247211

248212

249213
Extending image

15/root/usr/share/container-scripts/postgresql/README.md

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -208,42 +208,6 @@ container starts it will reset the passwords to the values stored in the
208208
environment variables.
209209

210210

211-
Upgrading database (by switching to newer PostgreSQL image version)
212-
-------------------------------------------------------------------
213-
214-
** Warning! Please, before you decide to do the data directory upgrade, always
215-
ensure that you've carefully backed up all your data and that you are OK with
216-
potential manual rollback! **
217-
218-
This image supports automatic upgrade of data directory created by
219-
the PostgreSQL server version 13 (and _only_ this version) - provided by sclorg
220-
image. The upgrade process is designed so that you should be able to just
221-
switch from *image A* to *image B*, and set the `$POSTGRESQL_UPGRADE` variable
222-
appropriately to explicitly request the database data transformation.
223-
224-
The upgrade process is internally implemented via `pg_upgrade` binary, and for
225-
that purpose the container needs to contain two versions of PostgreSQL server
226-
(have a look at `man pg_upgrade` for more info).
227-
228-
For the `pg_upgrade` process - and the new server version, we need to initialize
229-
a brand new data directory. That's data directory is created automatically by
230-
container tooling under /var/lib/pgsql/data, which is usually external
231-
bind-mountpoint. The `pg_upgrade` execution is then similar to dump&restore
232-
approach -- it starts both old and new PostgreSQL servers (within container) and
233-
"dumps" the old datadir while and at the same time it "restores" it into new
234-
datadir. This operation requires a lot of data files copying, so you can decide
235-
what type of upgrade you'll do by setting `$POSTGRESQL_UPGRADE` appropriately:
236-
237-
**`copy`**
238-
The data files are copied from old datadir to new datadir. This option has low risk of data loss in case of some upgrade failure.
239-
240-
**`hardlink`**
241-
Data files are hard-linked from old to the new data directory, which brings performance optimization - but the old directory becomes unusable, even in case of failure.
242-
243-
244-
Note that because we copy data directory, you need to make sure that you have
245-
enough space for the copy; upgrade failure because of not enough space might
246-
lead to data loss.
247211

248212

249213
Extending image

src/root/usr/share/container-scripts/postgresql/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ container starts it will reset the passwords to the values stored in the
208208
environment variables.
209209

210210

211+
{% if spec.prod == 'rhel7' or spec.prod == 'centos7' %}
211212
Upgrading database (by switching to newer PostgreSQL image version)
212213
-------------------------------------------------------------------
213214

@@ -244,6 +245,7 @@ what type of upgrade you'll do by setting `$POSTGRESQL_UPGRADE` appropriately:
244245
Note that because we copy data directory, you need to make sure that you have
245246
enough space for the copy; upgrade failure because of not enough space might
246247
lead to data loss.
248+
{% endif %}
247249

248250

249251
Extending image

test/run_test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,11 +663,11 @@ $volume_options
663663
run_upgrade_test ()
664664
{
665665
local ret=0
666-
# Do not run on Fedora or RHEL8 until the upgrade script
666+
# Do not run on Fedora or RHEL8+ until the upgrade script
667667
# is fixed for non-SCL use cases
668-
{ [ "${OS}" == "fedora" ] || [ "${OS}" == "rhel8" ]; } && return 0
668+
{ [ "${OS}" != "centos7" ] && [ "${OS}" != "rhel7" ]; } && return 0
669669

670-
local upgrade_path="none 9.2 9.4 9.5 9.6 10 12 13 15 none" prev= act=
670+
local upgrade_path="none 9.2 9.4 9.5 9.6 10 12 13 none" prev= act=
671671
for act in $upgrade_path; do
672672
if test "$act" = $VERSION; then
673673
break

0 commit comments

Comments
 (0)