Re: The memory usage is positively correlated with the number of partition tables when pg_get_expr is called.

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Zhu Yang <fairyfar@msn.com>
Cc: "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2025-08-20T12:09:10Z
Lists: pgsql-bugs
Zhu Yang <fairyfar@msn.com> writes:
> Unreasonable memory usage.

Not at all.  You have a session that has accessed 100000 tables.
If you don't want to eat a lot of relcache space, rethink your
schema.  (IMV, a table with hundreds or thousands of partitions
is an anti-pattern.)

			regards, tom lane