Problem with restoring dump (may be tsearch-related)
От | Markus Wollny |
---|---|
Тема | Problem with restoring dump (may be tsearch-related) |
Дата | |
Msg-id | 2266D0630E43BB4290742247C8910575014CE3C0@dozer.computec.de обсуждение исходный текст |
Ответы |
Re: Problem with restoring dump (may be tsearch-related)
(Oleg Bartunov <oleg@sai.msu.su>)
Re: Problem with restoring dump (may be tsearch-related) (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
Hi! I dump all of my databases daily using pgdumpall (./pg_dumpall > /var/pgbackup/alldb1.sql). Now if I try to restore the whole lot via "psql -d template1 -f alldb1.sql", I get loads and loads of parse errors like psql:alldb1.sql:1122826: ERROR: parser: parse error at or near "ußerst" psql:alldb1.sql:1122826: ERROR: parser: parse error at or near "chst" psql:alldb1.sql:1122826: ERROR: parser: parse error at or near "mmern" psql:alldb1.sql:1122827: ERROR: parser: parse error at or near "ren" psql:alldb1.sql:1122827: ERROR: parser: parse error at or near "rfer" psql:alldb1.sql:1122827: ERROR: parser: parse error at or near "ndig" psql:alldb1.sql:1122828: ERROR: parser: parse error at or near "ren" psql:alldb1.sql:1122828: ERROR: parser: parse error at or near "henvorteile" psql:alldb1.sql:1122828: ERROR: parser: parse error at or near "hten" psql:alldb1.sql:1122829: ERROR: parser: parse error at or near "ren" psql:alldb1.sql:1122829: ERROR: parser: parse error at or near "berqueren" psql:alldb1.sql:1122829: ERROR: parser: parse error at or near "cken" psql:alldb1.sql:1122830: ERROR: parser: parse error at or near "ren" psql:alldb1.sql:1122830: ERROR: parser: parse error at or near "ck" psql:alldb1.sql:1122831: ERROR: parser: parse error at or near "ren" psql:alldb1.sql:1122831: ERROR: parser: parse error at or near "hrend" psql:alldb1.sql:1122831: ERROR: parser: parse error at or near "ude" psql:alldb1.sql:1122831: ERROR: parser: parse error at or near "nnen" psql:alldb1.sql:1122831: ERROR: parser: parse error at or near "berzeugen" ... I tried to restore on an freshly installed system; I compiled and installed tsearch from contrib (just make install, I didn't prepare template1 with it), as I use it in some tables in several databases on the original installation. As the parse errors state substrings, I think it might have to do something with the txtidx type not being present at the time the inserts are being made. I can however create a sort of copy from the original system by creating the databases on the target-server first, then creating the tsearch-datatypes, functions and operators via the tsearch.sql for every one of them and then finally just piping the dump from one server to the other: ./pgsql/bin/pg_dump -h originalhost databasename | /./pgsql/bin/psql -h targethost databasename Now this doesn't help me much in case of a real crash when I would have to recreate the databases from the "alldb1.sql"-dump. How can I accomplish this? One way might be to create the databases, install tsearch for all of them, then parse the alldb1.sql and eliminate all "create database"-statements and the statements that are related to installation of tsearch - but I think that this would be a bit messy and I don't know if this method would yield guaranteed success as I don't exactly know what exactly I would need to throw out of the alldb1.sql. Is there some better way for restoring the dumps? Or am I doing something wrong (most probably :) ). Thanks for your help! Regards, Markus
В списке pgsql-general по дате отправления: