Re: BUG #11904: out of memory when scanning large number of partitions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: koposov(at)ast(dot)cam(dot)ac(dot)uk
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #11904: out of memory when scanning large number of partitions
Date: 2014-11-07 21:33:38
Message-ID: 14421.1415396018@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

koposov(at)ast(dot)cam(dot)ac(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message connor.penhale 2014-11-07 21:56:38 BUG #11905: "Error: Wrong key or corrupt data" with pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14
Previous Message koposov 2014-11-07 18:58:24 BUG #11904: out of memory when scanning large number of partitions