1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

Fix a couple of snapshot management bugs in the new ResourceOwner world:

non-writable large objects need to have their snapshots registered on the
transaction resowner, not the current portal's, because it must persist until
the large object is closed (which the portal does not).  Also, ensure that the
serializable snapshot is recorded by the transaction resource owner too, even
when a subtransaction has changed the current resource owner before
serializable is taken.

Per bug reports from Pavan Deolasee.
This commit is contained in:
Alvaro Herrera
2008-12-04 14:51:02 +00:00
parent 30c52532d2
commit 7b640b0345
7 changed files with 101 additions and 19 deletions

View File

@@ -83,6 +83,11 @@ SELECT lo_close(fd) FROM lotest_stash_values;
END;
-- Test resource management
BEGIN;
SELECT lo_open(loid, x'40000'::int) from lotest_stash_values;
ABORT;
-- Test truncation.
BEGIN;
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));