I have two PostgreSQL (14.5, Ubuntu 22.04) extensions A
and B
that each creates some functions in a common schema schm
.
Now I am having trouble re-creating the two extensions as there seems to be conflicts on the ownership of the common scheme.
If I run CREATE EXTENSION A;
first, it automatically creates the common schema schm
; and when I run CREATE EXTENSION B;
, postgres complains that
ERROR: schema schm is not a member of extension "b"
An extension may only use CREATE ... IF NOT EXISTS to skip object creation if the conflicting object is one that it already owns.
I also tried creating the shared schema in advance explicitly, which results in similar errors. The shared schema has worked before without a problem prior to PostgreSQL 14.4. But it stopped working after upgrading to 14.5, and the same error happens as of PostgreSQL 15 beta3.
My questions are:
What does it mean when postgres says a schema is a member of an extension or not? Is it not the database user/role that owns an extension? (e.g. among several extensions that create functions in public.
, which extension owns public.
?)
How to check/display the ownership between schemas and extensions?
How to solve the above "membership" or ownership conflict between the two extensions sharing a schema.