On Tue, Mar 30, 2021 at 04:17:03PM -0500, Merlin Moncure wrote: > Instructions: > 1. run the attached script in psql, pgtask_test.sql. It will create a > database, initialize it, and run the main procedure. dblink must be > available > 2. in another window, run SELECT CreateTaskChain('test', 'DEV');
For your reproducer, I needed to: 1.1) comment this: |INSERT INTO Task SELECT | -- 'test', 1.2) then run: CALL MAIN(); Anyway I reproduced this without an extension this time: CREATE OR REPLACE FUNCTION cfn() RETURNS void LANGUAGE PLPGSQL AS $$ declare a record; begin FOR a IN SELECT generate_series(1,99) LOOP PERFORM format('select 1'); END LOOP; END $$; $ yes 'SET jit_above_cost=0; SET jit_inline_above_cost=0; SET jit=on; SET client_min_messages=debug; SET log_executor_stats=on; SELECT cfn();' |head -11 |psql 2>&1 |grep 'max resident' ! 33708 kB max resident size ! 35956 kB max resident size ! 37800 kB max resident size ! 40300 kB max resident size ! 41928 kB max resident size ! 43928 kB max resident size ! 48496 kB max resident size ! 48964 kB max resident size ! 50460 kB max resident size ! 52272 kB max resident size ! 53740 kB max resident size There's also a relatively microscopic leak even if inline is off. It may be that this is what I reproduced last time - I couldn't see how a few hundred kB leak was causing a our process to be GB sized. It may or may not be a separate issue, though. -- Justin