Re: PATCH: optimized DROP of multiple tables within a transaction

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PATCH: optimized DROP of multiple tables within a transaction
Date: 2013-01-17 23:55:05
Message-ID: 50F88F59.1090903@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17.1.2013 20:19, Alvaro Herrera wrote:
>
> I'm curious -- why would you drop tables in groups of 100 instead of
> just doing the 100,000 in a single transaction? Maybe that's faster
> now, because you'd do a single scan of the buffer pool instead of 1000?
> (I'm assuming that "in groups of" means you do each group in a separate
> transaction)

There's a limited number of locks, and each DROP acquires a lock
(possibly more than one).

Tomas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-01-18 00:26:18 Re: could not create directory "...": File exists
Previous Message Andres Freund 2013-01-17 23:48:44 Re: Slave enters in recovery and promotes when WAL stream with master is cut + delay master/slave