Re: Lots of memory allocated when reassigning Large Objects
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Guillaume Lelarge <guillaume@lelarge.info>
Cc: Justin Pryzby <pryzby@telsasoft.com>,
PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2021-11-29T21:27:49Z
Lists: pgsql-hackers
Guillaume Lelarge <guillaume@lelarge.info> writes: > Le lun. 29 nov. 2021 à 20:39, Tom Lane <tgl@sss.pgh.pa.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
Commits
-
Avoid leaking memory during large-scale REASSIGN OWNED BY operations.
- fec187dc3ca2 10.20 landed
- 8f4b0200e15a 14.2 landed
- 82d354411749 11.15 landed
- 7413caabe66e 13.6 landed
- 5cf08b4db79d 12.10 landed
- babe545caeba 15.0 landed
-
Reduce memory consumption for pending invalidation messages.
- 3aafc030a536 15.0 cited