私は、postgresql 8.4 と postgis 1.5 を搭載した古い Ubuntu マシンからデータベースをダンプしました。新しい Ubuntu 12.04 に、postgresql 9.1 と postgis 1.5 をインストールしました。(postgis.sql と spatial_ref_sys.sql を使用して postgis_template を作成しました)。
新しいマシンでダンプを復元すると、データは構築されますが、次のような25個のエラーメッセージが表示されます。
...
pg_restore: [archiver (db)] Error from TOC entry 711; 1255 18533 FUNCTION gidx_in(cstring) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: function public.gidx_in(cstring) does not exist
Command was: DROP FUNCTION public.gidx_in(cstring);
pg_restore: [archiver (db)] Error from TOC entry 34; 1255 17743 FUNCTION geometry_send(geometry) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: type "geometry" does not exist
Command was: DROP FUNCTION public.geometry_send(geometry);
pg_restore: [archiver (db)] Error from TOC entry 33; 1255 17742 FUNCTION geometry_recv(internal) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: function public.geometry_recv(internal) does not exist
Command was: DROP FUNCTION public.geometry_recv(internal);
pg_restore: [archiver (db)] Error from TOC entry 31; 1255 17740 FUNCTION geometry_out(geometry) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: type "geometry" does not exist
Command was: DROP FUNCTION public.geometry_out(geometry);
pg_restore: [archiver (db)] Error from TOC entry 30; 1255 17739 FUNCTION geometry_in(cstring) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: function public.geometry_in(cstring) does not exist
Command was: DROP FUNCTION public.geometry_in(cstring);
pg_restore: [archiver (db)] Error from TOC entry 709; 1255 18529 FUNCTION geography_out(geography) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: type "geography" does not exist
Command was: DROP FUNCTION public.geography_out(geography);
何が起こっているのか誰か説明できますか? これらのエラーを無視してもいいですか?
ありがとう!よろしくお願いいたします
トニ
答え1
複数のエラーがあります。あなたこれらを注意深く読み、ダンプ ファイルを読んでください (上記のエラーで参照されている行を見つけて、これらのエラーが発生している場所が深刻な問題なのか、無視できるものなのかを判断します) --私たちはお客様の環境で何が重要なのか本当に分からないため、それをお伝えすることはできません。
エラー メッセージから判断すると、ダンプ ファイルはDROP
実際にデータをロードする前に古いデータベースの内容 (関数、型、テーブル) を消去しようとしているようです。そのため、既存のデータがないシステムに復元する場合、存在しないオブジェクトを削除しようとするとエラーが発生します。
これが起こっているのであれば、おそらくエラーを心配する必要はありません (ただし、将来使用するために「消去」コマンドなしでダンプを作成し、エラーが発生しないようにすることをお勧めします。pg_dump
マニュアルページ方法については、こちらをご覧ください。
関数/プロシージャの作成時にエラーが発生し始めた場合、そのエラーは深刻なものである可能性が高く、調査と修正が必要になります。