Re: BUG #11904: out of memory when scanning large number of partitions - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #11904: out of memory when scanning large number of partitions
Date
Msg-id 14421.1415396018@sss.pgh.pa.us
Whole thread Raw
In response to BUG #11904: out of memory when scanning large number of partitions  (koposov@ast.cam.ac.uk)
Responses Re: BUG #11904: out of memory when scanning large number of partitions  (Sergey Koposov <koposov@ast.cam.ac.uk>)
List pgsql-bugs
koposov@ast.cam.ac.uk writes:
> I have a large table (few Tb) partitioned in ~ 12000 smaller tables, using
> inheritance from the parent one.

That's an utterly insane number of partitions.

> I noticed that when the user tried to query from the parent table
> (not something we plan to do often), PG run out of memory (128 Gb on our
> machine).

I'm unsurprised.

The inheritance infrastructure is only designed to support maybe 100
child tables.  If we ever get around to implementing a hard-wired
partitioning scheme, it's possible that multiple thousands of partitions
could be practical, but it isn't today.  Sorry.

            regards, tom lane

pgsql-bugs by date:

Previous
From: koposov@ast.cam.ac.uk
Date:
Subject: BUG #11904: out of memory when scanning large number of partitions
Next
From: Rémi Zara
Date:
Subject: Build broken on mips