On Fri, 23 May 2025 10:37:42 +0800
jian he <jian.universality@gmail.com> wrote:
> On Thu, May 22, 2025 at 10:25 AM jian he <jian.universality@gmail.com> wrote:
> >
> hi.
> earlier, i didn't check patch 0002.
>
> i think in AlterFunction add
> /* Lock the function so nobody else can do anything with it. */
> LockDatabaseObject(ProcedureRelationId, funcOid, 0, AccessExclusiveLock);
>
> right after
> funcOid = LookupFuncWithArgs(stmt->objtype, stmt->func, false);
>
> should be fine.
Thank you. That makes sense because we can reduce redundant call of SearchSysCacheCopy1
and HeapTupleIsValid. I've attached a updated patch.
Regards,
Yugo Nagata
--
Yugo Nagata <nagata@sraoss.co.jp>