diff --git a/src/test/regress/expected/large_object.out b/src/test/regress/expected/large_object.out deleted file mode 100644 index b00d47cc75e..00000000000 --- a/src/test/regress/expected/large_object.out +++ /dev/null @@ -1,15 +0,0 @@ --- This is more-or-less DROP IF EXISTS LARGE OBJECT 3001; -WITH unlink AS (SELECT lo_unlink(loid) FROM pg_largeobject WHERE loid = 3001) SELECT 1; - ?column? ----------- - 1 -(1 row) - --- Test creation of a large object and leave it for testing pg_upgrade -SELECT lo_create(3001); - lo_create ------------ - 3001 -(1 row) - -COMMENT ON LARGE OBJECT 3001 IS 'testing comments'; diff --git a/src/test/regress/input/largeobject.source b/src/test/regress/input/largeobject.source index a19959a1b87..50c13eb4f3c 100644 --- a/src/test/regress/input/largeobject.source +++ b/src/test/regress/input/largeobject.source @@ -86,10 +86,8 @@ END; SELECT lo_from_bytea(0, lo_get(loid)) AS newloid FROM lotest_stash_values \gset --- Ideally we'd put a comment on this object for pg_dump testing purposes. --- But since pg_upgrade fails to preserve large object comments, doing so --- would break pg_upgrade's regression test. --- COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud'; +-- Add a comment to it, as well, for pg_dump/pg_upgrade testing. +COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud'; -- Read out a portion BEGIN; @@ -253,6 +251,13 @@ SELECT lo_from_bytea(0, E'\\xdeadbeef') AS newloid SET bytea_output TO hex; SELECT lo_get(:newloid); +-- Create one more object that we leave behind for testing pg_dump/pg_upgrade; +-- this one intentionally has an OID in the system range +SELECT lo_create(3001); + +COMMENT ON LARGE OBJECT 3001 IS 'testing comments'; + +-- Clean up DROP TABLE lotest_stash_values; DROP ROLE regresslo; diff --git a/src/test/regress/output/largeobject.source b/src/test/regress/output/largeobject.source index 8b34ac491b4..afdcb4b7dd0 100644 --- a/src/test/regress/output/largeobject.source +++ b/src/test/regress/output/largeobject.source @@ -90,10 +90,8 @@ END; -- it's left behind to help test pg_dump. SELECT lo_from_bytea(0, lo_get(loid)) AS newloid FROM lotest_stash_values \gset --- Ideally we'd put a comment on this object for pg_dump testing purposes. --- But since pg_upgrade fails to preserve large object comments, doing so --- would break pg_upgrade's regression test. --- COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud'; +-- Add a comment to it, as well, for pg_dump/pg_upgrade testing. +COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud'; -- Read out a portion BEGIN; UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer)); @@ -469,5 +467,15 @@ SELECT lo_get(:newloid); \xdeadbeef (1 row) +-- Create one more object that we leave behind for testing pg_dump/pg_upgrade; +-- this one intentionally has an OID in the system range +SELECT lo_create(3001); + lo_create +----------- + 3001 +(1 row) + +COMMENT ON LARGE OBJECT 3001 IS 'testing comments'; +-- Clean up DROP TABLE lotest_stash_values; DROP ROLE regresslo; diff --git a/src/test/regress/output/largeobject_1.source b/src/test/regress/output/largeobject_1.source index 5167a014183..86aa3c00322 100644 --- a/src/test/regress/output/largeobject_1.source +++ b/src/test/regress/output/largeobject_1.source @@ -90,10 +90,8 @@ END; -- it's left behind to help test pg_dump. SELECT lo_from_bytea(0, lo_get(loid)) AS newloid FROM lotest_stash_values \gset --- Ideally we'd put a comment on this object for pg_dump testing purposes. --- But since pg_upgrade fails to preserve large object comments, doing so --- would break pg_upgrade's regression test. --- COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud'; +-- Add a comment to it, as well, for pg_dump/pg_upgrade testing. +COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud'; -- Read out a portion BEGIN; UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer)); @@ -469,5 +467,15 @@ SELECT lo_get(:newloid); \xdeadbeef (1 row) +-- Create one more object that we leave behind for testing pg_dump/pg_upgrade; +-- this one intentionally has an OID in the system range +SELECT lo_create(3001); + lo_create +----------- + 3001 +(1 row) + +COMMENT ON LARGE OBJECT 3001 IS 'testing comments'; +-- Clean up DROP TABLE lotest_stash_values; DROP ROLE regresslo; diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule index 4e318763bce..60854066114 100644 --- a/src/test/regress/parallel_schedule +++ b/src/test/regress/parallel_schedule @@ -84,7 +84,7 @@ test: select_into select_distinct select_distinct_on select_implicit select_havi # ---------- # Another group of parallel tests # ---------- -test: brin gin gist spgist privileges security_label collate matview lock replica_identity rowsecurity object_address tablesample groupingsets large_object +test: brin gin gist spgist privileges security_label collate matview lock replica_identity rowsecurity object_address tablesample groupingsets # ---------- # Another group of parallel tests diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule index e23ad31adb3..985f6c9f02f 100644 --- a/src/test/regress/serial_schedule +++ b/src/test/regress/serial_schedule @@ -112,7 +112,6 @@ test: replica_identity test: rowsecurity test: object_address test: tablesample -test: large_object test: alter_generic test: misc test: psql diff --git a/src/test/regress/sql/large_object.sql b/src/test/regress/sql/large_object.sql deleted file mode 100644 index c06b393dd36..00000000000 --- a/src/test/regress/sql/large_object.sql +++ /dev/null @@ -1,7 +0,0 @@ --- This is more-or-less DROP IF EXISTS LARGE OBJECT 3001; -WITH unlink AS (SELECT lo_unlink(loid) FROM pg_largeobject WHERE loid = 3001) SELECT 1; - --- Test creation of a large object and leave it for testing pg_upgrade -SELECT lo_create(3001); - -COMMENT ON LARGE OBJECT 3001 IS 'testing comments';