Adjust lo_open() so that specifying INV_READ without INV_WRITE creates
Tom Lane <tgl@sss.pgh.pa.us>
Adjust lo_open() so that specifying INV_READ without INV_WRITE creates a descriptor that uses the current transaction snapshot, rather than SnapshotNow as it did before (and still does if INV_WRITE is set). This means pg_dump will now dump a consistent snapshot of large object contents, as it never could do before. Also, add a lo_create() function that is similar to lo_creat() but allows the desired OID of the large object to be specified. This will simplify pg_restore considerably (but I'll fix that in a separate commit).
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/lobj.sgml | modified | +74 −19 |
| src/backend/libpq/be-fsstubs.c | modified | +30 −16 |
| src/backend/storage/large_object/inv_api.c | modified | +85 −46 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_proc.h | modified | +3 −1 |
| src/include/libpq/be-fsstubs.h | modified | +2 −1 |
| src/include/storage/large_object.h | modified | +8 −3 |
| src/interfaces/libpq/exports.txt | modified | +2 −1 |
| src/interfaces/libpq/fe-lobj.c | modified | +55 −5 |
| src/interfaces/libpq/libpq-fe.h | modified | +2 −1 |
| src/interfaces/libpq/libpq-int.h | modified | +2 −1 |