Re: Connection Error during Pg_restore
От | Rebecca Clarke |
---|---|
Тема | Re: Connection Error during Pg_restore |
Дата | |
Msg-id | CANY3h+QXqZv99PzBLDkBO6mATbTTmYerU9UHnSbTQfygJRuwkw@mail.gmail.com обсуждение исходный текст |
Ответ на | Connection Error during Pg_restore (Rebecca Clarke <rebecca@clarke.net.nz>) |
Список | pgsql-general |
That worked thank you
On Wed, Aug 17, 2011 at 1:01 PM, raghu ram <raghuchennuru@gmail.com> wrote:
On Wed, Aug 17, 2011 at 4:32 PM, Rebecca Clarke <rebecca@clarke.net.nz> wrote:Hi thereI'm doing a restore of a large table. The backup file is 18gb. When I run the restore after sometime it comes up with this error while it is restoring the data.pg_restore: [archiver (db)] Error while PROCESSING TOC:pg_restore: [archiver (db)] Error from TOC entry 3022; 0 4287406059 TABLE DATA tbl_exampletable postgrespg_restore: [archiver (db)] COPY failed: server closed the connection unexpectedlyThis probably means the server terminated abnormallybefore or while processing the request.WARNING: errors ignored on restore: 1It will work if I use COPY but the table is so big I need to use pg_dump to compress it.Try below steps to restore data for larger table:1. Create a table structure2. copy data into .csv filecopy item_trans to '/opt/item_trans.csv' WITH csv;3. restore data with below commandnohup psql -d postgres -p 5432 -U postgres -c "copy item_trans from '/opt/item_trans.csv' WITH csv;" >>/tmp/restore.log 2>>/tmp/restore.log &--Raghu Ram
В списке pgsql-general по дате отправления: