diff --git a/README.md b/README.md index fcf175d..ba26ea7 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ lolor is an extension that makes Postgres' Large Objects compatible with Logical - [Basic Configuration](README.md#configuring-lolor) - [Using lolor](docs/using_lolor.md) - [Limitations](README.md#limitations) +- [Using pg_upgrade with lolor](docs/pg_upgrade_with_lolor.md) - [Release Notes](docs/lolor_release_notes.md) PostgreSQL supports large objects as related chunks as described in the [pg_largeobject](https://www.postgresql.org/docs/current/catalog-pg-largeobject.html) table. Large objects provide stream-style access to user data stored in a special large-object structure in the catalog. Large objects stored in catalog tables require special handling during replication; the lolor extension allows for the storage of large objects in non-catalog tables, aiding in replication of large objects. diff --git a/docs/pg_upgrade_with_lolor.md b/docs/pg_upgrade_with_lolor.md new file mode 100644 index 0000000..b816190 --- /dev/null +++ b/docs/pg_upgrade_with_lolor.md @@ -0,0 +1,27 @@ +# Using pg_upgrade with lolor + +The `pg_upgrade` utility is used for upgrading Postgres versions. + +You can use `pg_upgrade` with the `lolor` extension installed provided that you are using lolor version 1.2.2 or later. If you are using an older version of lolor, you will need to upgrade the extension first. + +Before running `pg_upgrade`, you must disable `lolor`. After executing pg_upgrade, you can enable lolor. Use `psql` or another client to disable lolor: + +``` +db1_17=# SELECT lolor.disable(); +``` + +Next, execute the upgrade. A sample `pg_ugrade` command appears below: + +``` +# pg_upgrade --old-datadir=/data/db1_17 \ + --new-datadir=/data/db1_18 \ + --old-bindir=/usr/lib/postgresql/17/bin \ + --new-bindir=/usr/lib/postgresql/18/bin \ + --link +``` + +Then, use psql to enable `lolor`: + +``` +db1_18=# SELECT lolor.enable(); +``` diff --git a/mkdocs.yml b/mkdocs.yml index e1909e0..41da73e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -52,4 +52,5 @@ nav: - lolor Overview: index.md - Building and Installing lolor: install_configure.md - Using lolor: using_lolor.md - - lolor Release Notes: lolor_release_notes.md \ No newline at end of file + - Using pg_upgrade with lolor: pg_upgrade_with_lolor.md + - lolor Release Notes: lolor_release_notes.md