On Thu, May 22, 2025 at 10:25 AM jian he <jian(dot)universality(at)gmail(dot)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.
attached are some simple isolation tests for
CREATE OR REPLACE FUNCTION, ALTER FUNCTION, DROP FUNCTION.