Re: cache lookup failed dropping public schema with trgm index

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Wyatt Alt <wyatt(dot)alt(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: cache lookup failed dropping public schema with trgm index
Date: 2023-08-22 01:43:59
Message-ID: ZOQS33jPKE8+bP1Z@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Aug 21, 2023 at 07:27:19PM -0400, Tom Lane wrote:
> Hmm. I see that 911e7020 modified pg_trgm's install script with
>
> +ALTER OPERATOR FAMILY gist_trgm_ops USING gist
> +ADD FUNCTION 10 (text) gtrgm_options (internal);
>
> I wonder whether that correctly adds a dependency to ensure the
> opfamily is dropped before the function.

The dependencies look OK seen from here when it comes to the
extension, the indexes or the option function. See, for instance:
=# SELECT pg_describe_object(classid, objid, objsubid) as obj,
pg_describe_object(refclassid,refobjid,refobjsubid) as objref,
deptype FROM pg_depend
WHERE (classid = 'pg_proc'::regclass AND objid = 'gtrgm_options'::regproc)
OR (refclassid = 'pg_proc'::regclass AND refobjid = 'gtrgm_options'::regproc);
-[ RECORD 1]------------------------------------------------------------------------------------------------------
obj | function gtrgm_options(internal)
objref | schema public
deptype | n
-[ RECORD 2
]------------------------------------------------------------------------------------------------------
obj | function gtrgm_options(internal)
objref | extension pg_trgm
deptype | e
-[ RECORD 3]------------------------------------------------------------------------------------------------------
obj | function 10 (text, text) of operator family gist_trgm_ops for access method gist: gtrgm_options(internal)
objref | function gtrgm_options(internal)
deptype | a
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2023-08-22 05:32:06 Re: pg_rewind WAL segments deletion pitfall
Previous Message Tom Lane 2023-08-21 23:27:19 Re: cache lookup failed dropping public schema with trgm index