Error While Processing Toc
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about pg_restore error relation already exists hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
Pg_restore Error Relation Does Not Exist
Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each pg_restore archiver (db) error while processing toc other. Join them; it only takes a minute: Sign up pg_restore toc error up vote 10 down vote favorite 1 i was using the following syntax for pg_dump and restore pg_dump eval --inserts -b -c --encoding UTF8 -Fc -f pg_restore error from toc entry relation does not exist eval.sql.tar.gz -x -U postgres createdb -T template0 test -U postgres pg_restore -d test eval.sql.tar.gz -e -U postgres the dump was successfull with no errors, but restore makes a some errors, i am dumping and restoring in same machine with same user and privilege all... i have tried out with other formats also, plain, tar, compressed all gets the same error.. my version of pg is 8.4.11 and psql version is 8.4.11 i am not sure what makes these
Pg_restore: [archiver (db)] Could Not Execute Query: Error: Must Be Owner Of Extension Plpgsql
errors.. can anyone help me pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 4965; 0 138871 TABLE DATA ir_act_report_xml insigni pg_restore: [archiver (db)] could not execute query: ERROR: invalid input syntax for integer: "purchase.order" LINE 1: ...st for Quotation', 'ir.actions.report.xml', NULL, 'purchase.... ^ Command was: INSERT INTO ir_act_report_xml VALUES (350, 'Request for Quotation', 'ir.actions.report.xml', NULL, 'purchase.order', 'purcha... postgresql pg-dump toc pg-restore share|improve this question asked Mar 23 '12 at 9:19 MAHI 1,19181738 1 Seems you dump is a SQL script that needs to be run using psql, not pg_restore –a_horse_with_no_name Mar 23 '12 at 11:38 add a comment| 1 Answer 1 active oldest votes up vote 10 down vote accepted this did the trick pg_dump database_name -c -Ft -f file_name.tar pg_restore -d database_name -c file_name.tar before this i was trying to restore with out including -c(clean) even though -c is included in pg_dump it is not used in pg_restore unless we say to use... share|improve this answer answered Apr 12 '12 at 9:25 MAHI 1,19181738 1 +1 for the -c flag. –Jonah Nov 6 '13 at 1:07 1 Using the "clean" flag can cause a lot of problems, too, because it will complain about missing objects when using a fresh database. –cslotty Jul 14 '15 at 9:54 add a comment| Your Answer draft saved draft discarded Sign up or log i
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about could not execute query error role does not exist Stack Overflow the company Business Learn more about hiring developers or posting ads with pg_restore: [archiver (db)] could not execute query: error: relation does not exist us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for
Command Was: Comment On Extension Plpgsql Is 'pl/pgsql Procedural Language';
database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody http://stackoverflow.com/questions/9836627/pg-restore-toc-error can answer The best answers are voted up and rise to the top Error restoring Postgres DB up vote 1 down vote favorite I'm trying to do a pg_restore on some SQL files. Here's the command I used when I dumped from the other database: pg_dump -f /home/mctools/public_html/cp/upload/manufacturers.sql \ -Fc -i -v -O -x -t manufacturers \ -h localhost -p 5432 -U aztools_tools aztools_dbuser And here is the restore command: pg_restore -d http://dba.stackexchange.com/questions/29476/error-restoring-postgres-db mctools_dbuser -Fc -c -i -O -x \ -h localhost -p 5432 -U mctools_user \ /home/mctools/public_html/cp/upload/manufacturers.sql Here is the error I get: pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 2165; 2606 27769168 CONSTRAINT manufacturers_pk aztools_tools pg_restore: [archiver (db)] could not execute query: ERROR: cannot drop constraint manufacturers_pk on table manufacturers because other objects depend on it DETAIL: constraint products_fk01 on table products depends on index manufacturers_pk HINT: Use DROP ... CASCADE to drop the dependent objects too. Command was: ALTER TABLE ONLY public.manufacturers DROP CONSTRAINT manufacturers_pk; What do I need to do to fix this? postgresql share|improve this question edited Nov 29 '12 at 10:02 Mat 6,56622234 asked Nov 29 '12 at 1:41 swg1cor14 10612 migrated from stackoverflow.com Nov 29 '12 at 5:19 This question came from our site for professional and enthusiast programmers. I tried to reproduce your problem with no success. The first thing I would check is the output auf pg_dump by dumping plain SQL instead of using the PostgreSQL custom format. If it looks fine, try to restore dumped database objects with psql -f plain_dump.sql. –Oliver F. Nov 29 '12 at 7:01 Do you really need the -c option in pg_restore? Exactly that's why pg_restore tries to dro
pgsql-announce pgsql-bugs pgsql-docs pgsql-general pgsql-interfaces pgsql-jobs pgsql-novice pgsql-performance pgsql-php https://www.postgresql.org/message-id/17A09E9509BB354E95C2FEE5102B0F5F0242084F@audiinsx0036.audi.vwg pgsql-sql pgsql-students Developer lists Regional lists Associations User groups Project lists Inactive lists IRC Local User Groups Featured Users International http://postgresql.nabble.com/Spurious-error-messages-from-pg-restore-td5769545.html Sites Propaganda Resources Weekly News Problem restoring database From: "Oeschey, Lars (I/EK-142, extern)"
Martin Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Spurious error messages from pg_restore When I use pg_restore with --clean to restore a PostgreSQL 9.2.4 database into a new, blank database it generates thousands of error messages like this: pg_restore: [archiver (db)] could not execute query: ERROR: schema "myschema" does not exist Command was: DROP INDEX myschema.some_index; The documentation [http://www.postgresql.org/docs/9.2/static/app-pgrestore.html] does warn about this: --clean Clean (drop) database objects before recreating them. (This might generate some harmless error messages, if any objects were not present in the destination database.) However, I don't agree that the error messages are "harmless". The harm is that I don't know whether everything was restored successfully or not. I think that's a serious problem. I cannot be sure that I haven't missed a "real" error among the thousands of "harmless" ones. Could pg_restore be smarter about this and use DROP IF EXISTS wherever possible? That won't be enough in cases where the schema doesn't exist, either, but it could also query to see which schemas exist and avoid trying to drop anything in those that don't (this might even save a little time). Also, even without --clean I get 3 errors: pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 6755; 2618 4417788 RULE geometry_columns_delete em pg_restore: [archiver (db)] could not execute query: ERROR: rule "geometry_columns_delete" for relation "geometry_columns" already exists Command was: CREATE RULE geometry_columns_delete AS ON DELETE TO geometry_columns DO INSTEAD NOTHING; (and same for "geometry_columns_insert" and "geometry_columns_update") This is probably because I have PostGIS installed as an extension (in both the source and target databases), which creates those rules. Could pg_restore use CREATE OR REPLACE whenever possible to avoid this? Adrian Klaver-3 Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: Spurious error messages from pg_restore On 09/04/2013 07:02 AM, Evan Martin wrote: > Also, even without --clean I get 3 errors: > > pg_restore: [archiver (db)] Error while PROCESSING TOC: > pg_restore: [archiver (db)] Error from TOC entry 6755; 2618 4417788 RULE > geometry_columns_delete em > pg_restore: [archiver (db)] could not execute query: ERROR: rule > "geometry_columns_delete" for relation "geometry