Re: bulk load performance question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bulk load performance question
Дата
Msg-id 7139.1286918534@sss.pgh.pa.us
обсуждение исходный текст
Ответ на bulk load performance question  (Samuel Gendler <sgendler@ideasculptor.com>)
Список pgsql-performance
Samuel Gendler <sgendler@ideasculptor.com> writes:
> Is there some way to do the drop+rename in a manner which will preserve the
> OID or otherwise allow blocked queries to execute correctly once they
> unblock?

No, but you could consider
    begin;
    truncate original_table;
    insert into original_table select * from new_data;
    commit;

> A secondary issue is that if permissions were granted to a role on the old
> table, the new table does not acquire those permissions and they must be
> granted again.

Not to mention foreign keys ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: read only transactions
Следующее
От: "Pierre C"
Дата:
Сообщение: Re: Slow count(*) again...