mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Fix pg_upgrade of large object permissions by preserving pg_auth.oid,
which is stored in pg_largeobject_metadata. No backpatch to 9.0 because you can't migrate from 9.0 to 9.0 with the same catversion (because of tablespace conflict), and a pre-9.0 migration to 9.0 has not large object permissions to migrate.
This commit is contained in:
@ -29,6 +29,7 @@ extern PGDLLIMPORT Oid binary_upgrade_next_index_pg_class_oid;
|
||||
extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_class_oid;
|
||||
|
||||
extern PGDLLIMPORT Oid binary_upgrade_next_pg_enum_oid;
|
||||
extern PGDLLIMPORT Oid binary_upgrade_next_pg_authid_oid;
|
||||
|
||||
Datum set_next_pg_type_oid(PG_FUNCTION_ARGS);
|
||||
Datum set_next_array_pg_type_oid(PG_FUNCTION_ARGS);
|
||||
@ -39,6 +40,7 @@ Datum set_next_index_pg_class_oid(PG_FUNCTION_ARGS);
|
||||
Datum set_next_toast_pg_class_oid(PG_FUNCTION_ARGS);
|
||||
|
||||
Datum set_next_pg_enum_oid(PG_FUNCTION_ARGS);
|
||||
Datum set_next_pg_authid_oid(PG_FUNCTION_ARGS);
|
||||
|
||||
PG_FUNCTION_INFO_V1(set_next_pg_type_oid);
|
||||
PG_FUNCTION_INFO_V1(set_next_array_pg_type_oid);
|
||||
@ -49,6 +51,7 @@ PG_FUNCTION_INFO_V1(set_next_index_pg_class_oid);
|
||||
PG_FUNCTION_INFO_V1(set_next_toast_pg_class_oid);
|
||||
|
||||
PG_FUNCTION_INFO_V1(set_next_pg_enum_oid);
|
||||
PG_FUNCTION_INFO_V1(set_next_pg_authid_oid);
|
||||
|
||||
|
||||
Datum
|
||||
@ -120,3 +123,13 @@ set_next_pg_enum_oid(PG_FUNCTION_ARGS)
|
||||
|
||||
PG_RETURN_VOID();
|
||||
}
|
||||
|
||||
Datum
|
||||
set_next_pg_authid_oid(PG_FUNCTION_ARGS)
|
||||
{
|
||||
Oid authoid = PG_GETARG_OID(0);
|
||||
|
||||
binary_upgrade_next_pg_authid_oid = authoid;
|
||||
PG_RETURN_VOID();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user