Thread

  1. Re: Prevent internal error at concurrent CREATE OR REPLACE FUNCTION

    Daniil Davydov <3danissimo@gmail.com> — 2025-10-01T13:30:38Z

    Hi,
    
    On Tue, Sep 30, 2025 at 9:02 AM Yugo Nagata <nagata@sraoss.co.jp> wrote:
    >
    > I've attached rebase patches.
    >
    
    It seems redundant to me that in CatalogIndexInsert we first check the
    unique constraint, and then pass the UNIQUE_CHECK_YES parameter
    to the index_insert function call below. As far as I understand, after
    check_unique_constraint we can be sure that everything is okay with
    inserted values.  Am I missing something?
    
    Also, why should we add "IsCatalogRelation(heapRelation)" check inside
    the CatalogIndexInsert function? We know for sure that a given table is a
    catalog relation.
    
    BTW, what do you think about adding an isolation test for a concurrent
    "CREATE OR REPLACE FUNCTION" command? This is one of the
    'problems' we're struggling with, but I don't see this case  being explicitly
    tested anywhere.
    
    All other changes look good to me.
    
    --
    Best regards,
    Daniil Davydov