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
** 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
** 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
0 commit comments