Hello,
I have an out of memory problem after upgrading from postgresql 12 to 16.3.
I have identified one query that can reproduce the error on demand. Once
the query starts, it will eventually exhaust all RAM and swap until the OOM
killer will stop postgresql.
The setup is as follows:
- One VMWARE
On Mon, Jun 3, 2024 at 6:19 AM Radu Radutiu wrote:
> Do you have any idea how to further debug the problem?
>
Putting aside the issue of non-reclaimed memory for now, can you show us
the actual query? The explain analyze you provided shows it doing an awful
lot of joins and then returning 14+ mi
On Mon, Jun 3, 2024 at 9:12 AM Greg Sabino Mullane
wrote:
> On Mon, Jun 3, 2024 at 6:19 AM Radu Radutiu wrote:
>
>> Do you have any idea how to further debug the problem?
>>
>
> Putting aside the issue of non-reclaimed memory for now, can you show us
> the actual query? The explain analyze you p
Greetings.
I am observing the following results on PostgreSQL 15.7
First, setup:
create table t_test(x bigint);
insert into t_test values(0);
create or replace function f_get_x()
returns bigint
language plpgsql
stable
as $function$
declare
l_result bigint;
begin
select x into l_result fr
You declared function f_get_x as stable which means:
https://www.postgresql.org/docs/15/sql-createfunction.html
STABLE indicates that the function cannot modify the database, and that
within a single table scan it will consistently return the same result for
the same argument values, but that its
пн, 3 июн. 2024 г. в 20:40, Pierre Forstmann :
> You declared function f_get_x as stable which means:
>
> …
>
> If you remove stable from function declaration, it works as expected:
>
Well, I checked
https://www.postgresql.org/docs/current/xfunc-volatility.html
There's a paragraph describing why
Victor Yegorov writes:
> пн, 3 июн. 2024 г. в 20:40, Pierre Forstmann :
>> If you remove stable from function declaration, it works as expected:
> ... therefore I assume STABLE should work in this case. Well, it seems not
> to.
I agree that this looks like a bug, since your example shows that th