Re: Copying large tables with DBLink

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Copying large tables with DBLink
Дата
Msg-id 5020.1111693222@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Copying large tables with DBLink  ("Chris Hoover" <revoohc@sermonaudio.com>)
Список pgsql-admin
"Chris Hoover" <revoohc@sermonaudio.com> writes:
> Has anyone had problems with memory exhaustion and dblink?  We were
> trying to use dblink to convert our databases to our new layout, and had
> our test server lock up several times when trying to copy a table that
> was significantly larger than our memory and swap.

You're not going to be able to do that with dblink, nor any other
set-returning function, because the current implementation of SRFs
always materializes the entire function result in temporary memory/swap.

Consider something like
    pg_dump -t srctab srcdb | psql destdb
instead.

            regards, tom lane

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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Copying large tables with DBLink
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Copying large tables with DBLink