Thread: postgresql9.5 partition table

postgresql9.5 partition table

From
mark
Date:
I defined a table using 1000 partition tables.
When I deleted or updated this table. It used a lot of memory and postmaster process is killed by OS. When I defined the same table using 100 partition tables. It can normally be updated and deleted. what is reason of this?



Re: postgresql9.5 partition table

From
Alvaro Herrera
Date:
mark wrote:
> I defined a table using 1000 partition tables.
> When I deleted or updated this table. It used a lot of memory and
> postmaster process is killed by OS. When I defined the same table
> using 100 partition tables. It can normally be updated and deleted.
> what is reason of this?

Postgres 9.5 is not prepared to deal with thousands of partitions.

You can try the improved partitioning with the new syntax introduced in
Postgres 10 -- you may have better luck there.  Please test it.
If it still doesn't work, let us know in detail what you tested and how
it failed.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: postgresql9.5 partition table

From
mark
Date:
Hi Herrera
Thanks for your reply.
I will try it in postgresql10.
Regards,
Mark

发自网易邮箱手机版

2017年12月29日 21:46Alvaro Herrera 写道:
mark wrote:
> I defined a table using 1000 partition tables.
> When I deleted or updated this table. It used a lot of memory and
> postmaster process is killed by OS. When I defined the same table
> using 100 partition tables. It can normally be updated and deleted.
> what is reason of this?

Postgres 9.5 is not prepared to deal with thousands of partitions.

You can try the improved partitioning with the new syntax introduced in
Postgres 10 -- you may have better luck there.  Please test it.
If it still doesn't work, let us know in detail what you tested and how
it failed.

--
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services