Skip to content

Commit bdcb586

Browse files
Add pg_upgrade to docs (#31)
Co-authored-by: susan-pgedge <[email protected]>
1 parent 69f2643 commit bdcb586

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ lolor is an extension that makes Postgres' Large Objects compatible with Logical
88
- [Basic Configuration](README.md#configuring-lolor)
99
- [Using lolor](docs/using_lolor.md)
1010
- [Limitations](README.md#limitations)
11+
- [Using pg_upgrade with lolor](docs/pg_upgrade_with_lolor.md)
1112
- [Release Notes](docs/lolor_release_notes.md)
1213

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

docs/pg_upgrade_with_lolor.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Using pg_upgrade with lolor
2+
3+
The `pg_upgrade` utility is used for upgrading Postgres versions.
4+
5+
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.
6+
7+
Before running `pg_upgrade`, you must disable `lolor`. After executing pg_upgrade, you can enable lolor. Use `psql` or another client to disable lolor:
8+
9+
```
10+
db1_17=# SELECT lolor.disable();
11+
```
12+
13+
Next, execute the upgrade. A sample `pg_ugrade` command appears below:
14+
15+
```
16+
# pg_upgrade --old-datadir=/data/db1_17 \
17+
--new-datadir=/data/db1_18 \
18+
--old-bindir=/usr/lib/postgresql/17/bin \
19+
--new-bindir=/usr/lib/postgresql/18/bin \
20+
--link
21+
```
22+
23+
Then, use psql to enable `lolor`:
24+
25+
```
26+
db1_18=# SELECT lolor.enable();
27+
```

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ nav:
5252
- lolor Overview: index.md
5353
- Building and Installing lolor: install_configure.md
5454
- Using lolor: using_lolor.md
55-
- lolor Release Notes: lolor_release_notes.md
55+
- Using pg_upgrade with lolor: pg_upgrade_with_lolor.md
56+
- lolor Release Notes: lolor_release_notes.md

0 commit comments

Comments
 (0)