Re: Lots of memory allocated when reassigning Large Objects

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Lots of memory allocated when reassigning Large Objects
Date: 2021-11-29 21:27:49
Message-ID: 1441514.1638221269@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
> Le lun. 29 nov. 2021 à 20:39, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> a écrit :
>> [ looks closer ... ] Ah, that patch is a bit buggy: it fails to do the
>> right thing in the cases where the loop does a "continue". The attached
>> revision seems to behave properly.

> I've tried your patch with my test case. It still uses a lot of memory.
> Actually even more.

Hmm ... I tried it with your test case, and I see the backend completing
the query without going beyond 190MB used (which is mostly shared memory).
Without the patch it blows past that point very quickly indeed.

I'm checking it in HEAD though; perhaps there's something else wrong
in the back branches?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-11-29 21:31:13 Re: improve CREATE EXTENSION error message
Previous Message Bossart, Nathan 2021-11-29 21:27:46 Re: improve CREATE EXTENSION error message