Re: a plpgsql bug - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: a plpgsql bug
Date
Msg-id CAKFQuwZQnBBDPYq=kj++eh0X_K5eE_+K9yLWBn5vO7K1ysYcNg@mail.gmail.com
Whole thread Raw
In response to a plpgsql bug  ("daidewei@highgo.com" <daidewei@highgo.com>)
Responses Re: a plpgsql bug
List pgsql-bugs
On Mon, Sep 18, 2023 at 11:46 PM daidewei@highgo.com <daidewei@highgo.com> wrote:
    I found a problem in plpgsql. When there is a large loop in plpgsql, it is found that the change of search_path will cause memory exhaustion and thus disconnect the connection.

It is impossible to prevent queries from exhausting memory so the fact that this one does isn't an indication of a bug on its own.  I'm having trouble imagining a reasonable use case for this pattern of changing search_path frequently in a loop within a single execution of a function.  That said, I'm not in a position to judge how easy or difficult an improvement in this area may be.

David J.

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: [16+] subscription can end up in inconsistent state
Next
From: Tom Lane
Date:
Subject: Re: a plpgsql bug