Re: Dropping a partitioned table takes too long
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>,
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: 高增琦 <pgf00a@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-04-26T16:21:39Z
Lists: pgsql-hackers
On 4/26/17 12:15, Robert Haas wrote: > On Tue, Apr 25, 2017 at 10:05 PM, Amit Langote > <Langote_Amit_f8@lab.ntt.co.jp> wrote: >>> The attached patch try to replace 'heap_open' with 'LockRelationOid' when >>> locking parent table. >>> It improved dropping a table with 7000 partitions. >> >> Your patch seems to be a much better solution to the problem, thanks. > > Does anyone wish to object to this patch as untimely? > > If not, I'll commit it. Seems quite reasonable. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
In load_relcache_init_file, initialize rd_pdcxt.
- 5e1ccd48442d 10.0 landed
-
Speed up dropping tables with many partitions.
- c1e0e7e1d790 10.0 landed