Re: Re: best practice for moving millions of rows to child table when setting up partitioning?

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Re: best practice for moving millions of rows to child table when setting up partitioning?
Дата
Msg-id BANLkTinRFTF0ywHQua9ZgJ28sEqdKxNHXA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: best practice for moving millions of rows to child table when setting up partitioning?  (Mark Stosberg <mark@summersault.com>)
Ответы Re: Re: best practice for moving millions of rows to child table when setting up partitioning?
Список pgsql-admin
On Wed, May 4, 2011 at 10:48 AM, Mark Stosberg <mark@summersault.com> wrote:
>
>>> 5. Finally, I'll drop the indexes on the parent table and
>>> truncate it.
>
> Luckily I noticed the problem with TRUNCATE and partitioning before my
> work got to production.
>
> TRUNCATE cascades automatically and silently to child tables, which was
> not my intent.
>
> This is mentioned here:
> http://wiki.postgresql.org/wiki/Table_partitioning
>
> But is not mentioned in the official documentation for TRUNCATE:
>
> http://www.postgresql.org/docs/9.0/static/sql-truncate.html

Surely it is.  Quoting:

"If ONLY is specified, only that table is truncated. If ONLY is not
specified, the table and all its descendant tables (if any) are
truncated. "

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

Предыдущее
От: Mark Stosberg
Дата:
Сообщение: Re: best practice for moving millions of rows to child table when setting up partitioning?
Следующее
От: Mark Stosberg
Дата:
Сообщение: Re: Re: best practice for moving millions of rows to child table when setting up partitioning?