With work_mem changed to 64MB, try increasing for these tasks that create temp files

2025-01-25 14:53:56 UTC [388351]: app=psql LOG:  disconnection: session time: 0:00:00.004 user=hafbe_user database=haf_block_log host=172.19.0.4 port=40852
 2025-01-25 14:53:57 UTC [378246]: app=hivemind_finish_hive_posts LOG:  temporary file: path "pg_tblspc/16396/PG_17_202406281/pgsql_tmp/pgsql_tmp378246.5", size 1073741824
 2025-01-25 14:53:57 UTC [378246]: app=hivemind_finish_hive_posts CONTEXT:  SQL statement "UPDATE hivemind_app.hive_posts uhp
           SET children = s.child_count
           FROM
           hivemind_app.__post_children s
           WHERE s.id = uhp.id and s.child_count != uhp.children"
         PL/pgSQL function hivemind_app.update_all_hive_posts_children_count() line 35 at SQL statement
 2025-01-25 14:53:57 UTC [378246]: app=hivemind_finish_hive_posts STATEMENT:  SELECT hivemind_app.update_all_hive_posts_children_count()
 2025-01-25 14:53:57 UTC [378246]: app=hivemind_finish_hive_posts LOG:  temporary file: path "pg_tblspc/16396/PG_17_202406281/pgsql_tmp/pgsql_tmp378246.6", size 1073741824
 2025-01-25 14:53:57 UTC [378246]: app=hivemind_finish_hive_posts CONTEXT:  SQL statement "UPDATE hivemind_app.hive_posts uhp
           SET children = s.child_count
           FROM
           hivemind_app.__post_children s
           WHERE s.id = uhp.id and s.child_count != uhp.children"
         PL/pgSQL function hivemind_app.update_all_hive_posts_children_count() line 35 at SQL statement
 2025-01-25 14:53:57 UTC [378246]: app=hivemind_finish_hive_posts STATEMENT:  SELECT hivemind_app.update_all_hive_posts_children_count()
 2025-01-25 14:53:57 UTC [378246]: app=hivemind_finish_hive_posts LOG:  temporary file: path "pg_tblspc/16396/PG_17_202406281/pgsql_tmp/pgsql_tmp378246.7", size 122669584
 2025-01-25 14:53:57 UTC [378246]: app=hivemind_finish_hive_posts CONTEXT:  SQL statement "UPDATE hivemind_app.hive_posts uhp
           SET children = s.child_count
           FROM
           hivemind_app.__post_children s
           WHERE s.id = uhp.id and s.child_count != uhp.children"
         PL/pgSQL function hivemind_app.update_all_hive_posts_children_count() line 35 at SQL statement
 2025-01-25 14:53:57 UTC [378246]: app=hivemind_finish_hive_posts STATEMENT:  SELECT hivemind_app.update_all_hive_posts_children_count()
 2025-01-25 14:53:57 UTC [378246]: app=hivemind_finish_hive_posts LOG:  duration: 1823479.605 ms  statement: SELECT hivemind_app.update_all_hive_posts_children_count()