Re: Interesting case of IMMUTABLE significantly hurting performance - Mailing list pgsql-general

From Dominique Devienne
Subject Re: Interesting case of IMMUTABLE significantly hurting performance
Date
Msg-id CAFCRh-_H5m_+z=JkKSpmrK=D6nLje1kG11tiCwkC2OXBSD5Ttw@mail.gmail.com
Whole thread Raw
In response to Re: Interesting case of IMMUTABLE significantly hurting performance  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Fri, Apr 11, 2025 at 5:52 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Merlin Moncure <mmoncure@gmail.com> writes:
> > I guess the real problems here are lack of feedback on a number of fronts:
> > *) the server knows the function is not immutable but lets you create it
> > anyway, even though it can have negative downstream consequences
>
> That's debatable I think.  If you know what you're doing, you're going
> to be annoyed by warnings telling you that you don't.

True, but that's typically what pragmas in the code are for then,
to explicitly suppress warnings.

Or a new option in the CREATE FUNCTION command. Better safe than sorry,
and I prefer useful "on-by-default" warnings for the non-experts,
which can be disabled, than silence.

PS: And FWIW, I removed all attributes from the functions I'm
writting, based on your aerlier advice Tom.



pgsql-general by date:

Previous
From: Nico Williams
Date:
Subject: Re: Interesting case of IMMUTABLE significantly hurting performance
Next
From: Dimitrios Apostolou
Date:
Subject: Re: pg_restore causing ENOSPACE on the WAL partition