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

Поиск
Список
Период
Сортировка
От Shigeru Hanada
Тема Re: PATCH: optimized DROP of multiple tables within a transaction
Дата
Msg-id CAEZqfEe4GfsOZ1iE_4Jd-8-OpBumAkuB=QeV1xo82Jch9ZRXOw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PATCH: optimized DROP of multiple tables within a transaction  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-hackers
On Sun, Dec 9, 2012 at 1:07 AM, Tomas Vondra <tv@fuzzy.cz> wrote:
> * If you're dropping a single table, it really does not matter - the
>   difference will be like 100 ms vs. 200 ms or something like that.

Did you try dropping 10,000 tables in 100 batches, as same as previous post?
If so the overhead introduced by the patch is only 1.52ms per table.
It seems acceptable to me.

> So I'd vote to ditch that special case optimization.

+1.  It seems very difficult to determine reasonable threshold of such
kind of optimization.  As described above, the overhead seems enough
little, so using bsearch in any case seems fine.

Besides, v3.2 patch needs some more fixes, for minor issues.

* Opening curly bracket of if/for/while/etc. should be in the next
line, like this:
    if (foo == bar) /* { <= not here */
    {
        ...
    }
* Use hard-tab instead of white-spaces to indent variable name in declarations.
  For these two issues, please see the page below:
  http://www.postgresql.org/docs/9.2/static/source-format.html

* PostgreSQL allows C89 features, so we can't use variable length array.
* Contains unintentional blank lines?

Please see attached patch for details of fixes above.

--
Shigeru HANADA

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Karl O. Pinc"
Дата:
Сообщение: Re: [PATCH] PL/Python: Add spidata to all spiexceptions
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Support for REINDEX CONCURRENTLY