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
Copy file name to clipboardExpand all lines: README.md
+17-78Lines changed: 17 additions & 78 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,16 @@
2
2
3
3
lolor is an extension that makes Postgres' Large Objects compatible with Logical Replication.
4
4
5
-
PostgreSQL supports large objects as related chunks as described in the [pg_largeobject](https://www.postgresql.org/docs/17/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.
5
+
## Table of Contents
6
+
-[lolor Overview](docs/index.md)
7
+
-[Building and Installing lolor](docs/install_configure.md)
lolor creates and manages large object related tables in the lolor schema:
12
+
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.
13
+
14
+
lolor creates and manages large object related tables in the `lolor` schema:
8
15
9
16
```
10
17
lolor.pg_largeobject
@@ -13,41 +20,29 @@ lolor.pg_largeobject_metadata
13
20
14
21
PostgreSQL large objects allow you to store huge files within the database. Each large object is recognised by an OID that is assigned at the time of its creation. lolor stores objects in smaller segments within a separate system table and generates associated OIDs for large objects that are distinct from those of native large objects.
15
22
16
-
## Requirements
17
-
Use of the lolor extension requires PostgreSQL 16 or newer.
18
-
19
-
## Installation
20
-
21
-
**Installing lolor with pgEdge binaries**
22
-
23
-
You can use the `pgedge` command line interface (CLI) to install the lolor extension (https://github.com/pgEdge/pgedge/blob/main/README.md).
24
-
25
-
To use pgEdge binaries to install lolor, go to [pgeEdge Github](https://github.com/pgEdge/pgedge) and install the pgEdge CLI:
26
-
27
-
`./pgedge install pg16 --start : install lolor`
23
+
Use of the lolor extension requires Postgres 16 or newer.
28
24
29
-
**Installing lolor from source code**
25
+
### Building and Installing lolor
30
26
31
-
You can also compile and install the extension from the source code, with the same guidelines as any other PostgreSQL extension constructed using PGXS.
32
-
Make sure that your PATH environment variable includes the directory where `pg_config` (under your PostgreSQL installation) is located.
27
+
You can also compile and install the extension from the source code, with the same guidelines as any other Postgres extension constructed using PGXS.
28
+
Make sure that your PATH environment variable includes the directory where `pg_config` (under your Postgres installation) is located.
33
29
34
30
```
35
-
export PATH=/opt/pg16/bin:$PATH
31
+
export PATH=/opt/pg17/bin:$PATH
36
32
37
33
# compile
38
34
make USE_PGXS=1
39
35
# install, might be requiring sudo for the installation step
40
36
make USE_PGXS=1 install
41
37
```
42
38
43
-
After installing the lolor extension with either the pgEdge binary or from source code, connect to your Postgres database and create the extension with the command:
39
+
After installing the lolor extension, connect to your Postgres database and create the extension with the command:
44
40
45
41
```
46
42
CREATE EXTENSION lolor;
47
43
```
48
44
49
-
50
-
### Configuration
45
+
### Configuring lolor
51
46
52
47
You must set the `lolor.node` parameter before using the extension. The value can be from 1 to 2^28; the value is used to help in generation of new large object OID.
53
48
@@ -72,63 +67,7 @@ the following commands to add the tables:
# lolor - Managing Large Objects for Logical Replication
2
+
3
+
[lolor](https://github.com/pgEdge/lolor) is an extension that makes Postgres-style large objects compatible with logical Replication.
4
+
5
+
Postgres 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.
6
+
7
+
lolor creates and manages large object related tables in the `lolor` schema:
8
+
9
+
```
10
+
lolor.pg_largeobject
11
+
lolor.pg_largeobject_metadata
12
+
```
13
+
14
+
Postgres large objects allow you to store large files within the database. Each large object is recognised by an OID that is assigned at the time of its creation. lolor stores objects in smaller segments within a separate system table and generates associated OIDs for large objects that are distinct from those of native large objects.
15
+
16
+
Use of the `lolor` extension requires Postgres 16 or newer.
17
+
18
+
19
+
## Limitations
20
+
21
+
- Native Postgres large object functionality cannot be used while you are using the lolor extension.
22
+
- Native large object migration to the lolor feature is not available yet.
23
+
- lolor does not support the following statements: `ALTER LARGE OBJECT`, `GRANT ON LARGE OBJECT`, `COMMENT ON LARGE OBJECT`, and `REVOKE ON LARGE OBJECT`.
lolor is supported on Postgres versions 16 and later.
4
+
5
+
You can use the CLI's Update Manager (`um`) module to install the lolor extension. After installing pgEdge Distributed Postgres, navigate into the `pgedge` directory and add lolor to your installation with the command:
6
+
7
+
`./pgedge um install lolor`
8
+
9
+
You can also compile and install the extension from the [source code](https://github.com/pgEdge/lolor), with the same guidelines as any other Postgres extension constructed using PGXS. Make sure that your PATH environment variable includes the directory where `pg_config` (under your PostgreSQL installation) is located.
10
+
11
+
```
12
+
export PATH=/opt/pg16/bin:$PATH
13
+
14
+
# compile
15
+
make USE_PGXS=1
16
+
make USE_PGXS=1 install
17
+
```
18
+
19
+
After installing the lolor extension with either the `um` module or from source code, connect to your Postgres database and create the extension with the command:
20
+
21
+
```
22
+
CREATE EXTENSION lolor;
23
+
```
24
+
25
+
## Configuring lolor
26
+
27
+
You must set the `lolor.node` parameter on each node in your replication cluster before using the extension. The value can be from 1 to 2^28; the value is used to help in generation of new large object OID.
28
+
29
+
```
30
+
lolor.node = 1
31
+
```
32
+
33
+
You can also change the `search_path` to pick large object related tables from the `lolor` schema:
34
+
35
+
```
36
+
SET search_path=lolor,"$user",public,pg_catalog
37
+
```
38
+
39
+
lolor renames any existing methods in `pg_catalog.lo_*` to `pg_catalog.lo_*_orig`, and new versions of these methods are introduced. If you remove the extension, the renamed `pg_catalog.lo_*_orig` functions are restored to their initial names.
40
+
41
+
While using `pgedge` replication with large objects, you must have the `pg_largeobject` and `pg_largeobject_metadata` tables in your replication set; use
0 commit comments