I have 'out of mem' on postgresql 12 when updating a partitioned table with subquery. I have Project and Content relations. Content is partitioned by type and subpartitioned by project.
createdb test ./schema.sh > schema.sql ./data.sh > data.sql psql test < schema.sql psql test < data.sql
2. Update with prepared ids - no problem SELECT id into agg FROM "content" WHERE "content"."id" IN (SELECT U0."id" AS Col1 FROM "content" U0 INNER JOIN "project" U2 ON (U0."project_id" = U2."id") WHERE (U0."service_id" = 2 AND U0."type_id" = 0 AND U2."user_id" = 1)); SELECT 1000
UPDATE "content" SET "value" = '1' WHERE "content"."id" IN (select id from agg); UPDATE 1000
3. Update with subquery - out of mem UPDATE "content" SET "value" = '1' WHERE "content"."id" IN (SELECT U0."id" AS Col1 FROM "content" U0 INNER JOIN "project" U2 ON (U0."project_id" = U2."id") WHERE (U0."service_id" = 2 AND U0."type_id" = 0 AND U2."user_id" = 1));
^CCancel request sent ^CCancel request sent ^CCancel request sent ^CCancel request sent ^CCancel request sent server closed the connection unexpectedly