aspenbr
asked on
Problem for restoure database
Hi ,
I am trying restoure database Postgres 9.1 on Windows 2003 -32 bits to Centos6-64 bits , along the process restoure show me this error message . Some error I get solve but others I don´t understand very well then I put the errors in bold , please somebody explain for me how can I solve this problem ?
pg_restore: [arquivador (bd)] Erro ao PROCESSAR TOC:
pg_restore: [arquivador (bd)] Erro no registro do TOC 238; 3079 11638 EXTENSION plpgsql
pg_restore: [arquivador (bd)] could not execute query: ERRO: erro de sintaxe em ou próximo a "EXTENSION"
LINHA 1: CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalo...
^
Command was: CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
pg_restore: criando COMMENT EXTENSION plpgsql
pg_restore: [arquivador (bd)] Erro no registro do TOC 3438; 0 0 COMMENT EXTENSION plpgsql
pg_restore: [arquivador (bd)] could not execute query: ERRO: erro de sintaxe em ou próximo a "EXTENSION"
LINHA 1: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural languag...
^
Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
pg_restore: [arquivador (bd)] Erro no registro do TOC 909; 1255 28930 FUNCTION pldbg_get_target_info(text , "char") postgres
pg_restore: [arquivador (bd)] could not execute query: ERRO: não pôde acessar arquivo "$libdir/targetinfo": Arquivo ou diretório não encontrado
Command was: CREATE FUNCTION pldbg_get_target_info(sign ature text, targettype "char") RETURNS targetinfo
LANGUAGE c STRICT
AS '$l...
pg_restore: [arquivador (bd)] could not execute query: ERRO: função public.pldbg_get_target_in fo(text, "char") não existe
Command was: ALTER FUNCTION public.pldbg_get_target_in fo(signatu re text, targettype "char") OWNER TO postgres;
pg_restore: criando FUNCTION plpgsql_oid_debug(oid)
pg_restore: [arquivador (bd)] Erro no registro do TOC 910; 1255 28939 FUNCTION plpgsql_oid_debug(oid) postgres
pg_restore: [arquivador (bd)] could not execute query: ERRO: não pôde acessar arquivo "$libdir/plugins/plugin_de bugger": Arquivo ou diretório não encontrado
Command was: CREATE FUNCTION plpgsql_oid_debug(function oid oid) RETURNS integer
LANGUAGE c STRICT
AS '$libdir/plugins/plugin_de bu...
pg_restore: [arquivador (bd)] could not execute query: ERRO: função public.plpgsql_oid_debug(o id) não existe
Command was: ALTER FUNCTION public.plpgsql_oid_debug(f unctionoid oid) OWNER TO postgres;
pg_restore: [arquivador (bd)] Erro no registro do TOC 4133; 0 0 ACL pldbg_get_target_info(text , "char") postgres
pg_restore: [arquivador (bd)] could not execute query: ERRO: função pldbg_get_target_info(text , "char") não existe
Command was: REVOKE ALL ON FUNCTION pldbg_get_target_info(sign ature text, targettype "char") FROM PUBLIC;
REVOKE ALL ON FUNCTION pldbg_ge...
pg_restore: definindo dono e privilégios para FUNCTION plpgsql_oid_debug(oid)
pg_restore: definindo dono e privilégios para ACL plpgsql_oid_debug(oid)
pg_restore: [arquivador (bd)] Erro no registro do TOC 4134; 0 0 ACL plpgsql_oid_debug(oid) postgres
pg_restore: [arquivador (bd)] could not execute query: ERRO: função plpgsql_oid_debug(oid) não existe
Command was: REVOKE ALL ON FUNCTION plpgsql_oid_debug(function oid oid) FROM PUBLIC;
REVOKE ALL ON FUNCTION plpgsql_oid_debug(function oid ...
Thanks
I am trying restoure database Postgres 9.1 on Windows 2003 -32 bits to Centos6-64 bits , along the process restoure show me this error message . Some error I get solve but others I don´t understand very well then I put the errors in bold , please somebody explain for me how can I solve this problem ?
pg_restore: [arquivador (bd)] Erro ao PROCESSAR TOC:
pg_restore: [arquivador (bd)] Erro no registro do TOC 238; 3079 11638 EXTENSION plpgsql
pg_restore: [arquivador (bd)] could not execute query: ERRO: erro de sintaxe em ou próximo a "EXTENSION"
LINHA 1: CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalo...
^
Command was: CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
pg_restore: criando COMMENT EXTENSION plpgsql
pg_restore: [arquivador (bd)] Erro no registro do TOC 3438; 0 0 COMMENT EXTENSION plpgsql
pg_restore: [arquivador (bd)] could not execute query: ERRO: erro de sintaxe em ou próximo a "EXTENSION"
LINHA 1: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural languag...
^
Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
pg_restore: [arquivador (bd)] Erro no registro do TOC 909; 1255 28930 FUNCTION pldbg_get_target_info(text
pg_restore: [arquivador (bd)] could not execute query: ERRO: não pôde acessar arquivo "$libdir/targetinfo": Arquivo ou diretório não encontrado
Command was: CREATE FUNCTION pldbg_get_target_info(sign
LANGUAGE c STRICT
AS '$l...
pg_restore: [arquivador (bd)] could not execute query: ERRO: função public.pldbg_get_target_in
Command was: ALTER FUNCTION public.pldbg_get_target_in
pg_restore: criando FUNCTION plpgsql_oid_debug(oid)
pg_restore: [arquivador (bd)] Erro no registro do TOC 910; 1255 28939 FUNCTION plpgsql_oid_debug(oid) postgres
pg_restore: [arquivador (bd)] could not execute query: ERRO: não pôde acessar arquivo "$libdir/plugins/plugin_de
Command was: CREATE FUNCTION plpgsql_oid_debug(function
LANGUAGE c STRICT
AS '$libdir/plugins/plugin_de
pg_restore: [arquivador (bd)] could not execute query: ERRO: função public.plpgsql_oid_debug(o
Command was: ALTER FUNCTION public.plpgsql_oid_debug(f
pg_restore: [arquivador (bd)] Erro no registro do TOC 4133; 0 0 ACL pldbg_get_target_info(text
pg_restore: [arquivador (bd)] could not execute query: ERRO: função pldbg_get_target_info(text
Command was: REVOKE ALL ON FUNCTION pldbg_get_target_info(sign
REVOKE ALL ON FUNCTION pldbg_ge...
pg_restore: definindo dono e privilégios para FUNCTION plpgsql_oid_debug(oid)
pg_restore: definindo dono e privilégios para ACL plpgsql_oid_debug(oid)
pg_restore: [arquivador (bd)] Erro no registro do TOC 4134; 0 0 ACL plpgsql_oid_debug(oid) postgres
pg_restore: [arquivador (bd)] could not execute query: ERRO: função plpgsql_oid_debug(oid) não existe
Command was: REVOKE ALL ON FUNCTION plpgsql_oid_debug(function
REVOKE ALL ON FUNCTION plpgsql_oid_debug(function
Thanks
I suspect that you have version 9.0 on linux as EXTENSION is new functionality in versio 9.1
I think that hapens because you don't have installed the language plpgsql on 9.1 and you have PG code (functions/triggers/...) written in it. Please see below how to install it on 9.1
http://www.postgresql.org/docs/9.1/static/sql-createlanguage.html
http://www.postgresql.org/docs/9.1/static/xplang-install.html
http://www.postgresql.org/docs/9.1/static/sql-createlanguage.html
http://www.postgresql.org/docs/9.1/static/xplang-install.html
ASKER
Hi earthman2
Sorry for my mistake , I am using the version 9.0
rpm -qa |grep postgre
postgresql90-9.0.7-1PGDG.r hel6.x86_6 4
postgresql90-docs-9.0.7-1P GDG.rhel6. x86_64
postgresql90-contrib-9.0.7 -1PGDG.rhe l6.x86_64
postgresql90-libs-9.0.7-1P GDG.rhel6. x86_64
postgresql90-server-9.0.7- 1PGDG.rhel 6.x86_64
Sorry for my mistake , I am using the version 9.0
rpm -qa |grep postgre
postgresql90-9.0.7-1PGDG.r
postgresql90-docs-9.0.7-1P
postgresql90-contrib-9.0.7
postgresql90-libs-9.0.7-1P
postgresql90-server-9.0.7-
You should be able to ignore problems with extension, make sure you enable plpgsql if you need it use command line utility createlang
createlang --dbname YOURDBNAME plpgsql
createlang --dbname YOURDBNAME plpgsql
ASKER
Hi earthman2
I did command below but show me message that language is already installed in database
-bash-4.1$ createlang --dbname gesop_construcao plpgsql
createlang: language "plpgsql" is already installed in database "gesop_construcao"
Why the errors message for restoure still ?
I did command below but show me message that language is already installed in database
-bash-4.1$ createlang --dbname gesop_construcao plpgsql
createlang: language "plpgsql" is already installed in database "gesop_construcao"
Why the errors message for restoure still ?
The error messages you have posted are all related to the a
stored procedure language plpgsql as it is installed on version.1
Since the linux version 9.0 cannot process the EXTENSION syntax it complains. As plpgsql is already installed these message should possibly just be ignored.. you need to be aware of any other version incompatibility issues. normally you migrate. to a later version of a database...
stored procedure language plpgsql as it is installed on version.1
Since the linux version 9.0 cannot process the EXTENSION syntax it complains. As plpgsql is already installed these message should possibly just be ignored.. you need to be aware of any other version incompatibility issues. normally you migrate. to a later version of a database...
ASKER
Thank you by tips, I did install Postgres version 9.1 this time the error below not show :
LINHA 1: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural languag...
^
Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';about
The issue $libdir/targetinfo and $libdir/plugins/plugin_deb ugger continues . Do you know where I can get the file for install theses libraries ?
pg_restore: creating FUNCTION pldbg_get_target_info(text , "char")
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 909; 1255 28930 FUNCTION pldbg_get_target_info(text , "char") postgres
pg_restore: [archiver (db)] could not execute query: ERROR: could not access file "$libdir/targetinfo": No such file or directory
Command was: CREATE FUNCTION pldbg_get_target_info(sign ature text, targettype "char") RETURNS targetinfo
LANGUAGE c STRICT
AS '$l...
pg_restore: [archiver (db)] could not execute query: ERROR: function public.pldbg_get_target_in fo(text, "char") does not exist
Command was: ALTER FUNCTION public.pldbg_get_target_in fo(signatu re text, targettype "char") OWNER TO postgres;
pg_restore: creating FUNCTION plpgsql_oid_debug(oid)
pg_restore: [archiver (db)] Error from TOC entry 910; 1255 28939 FUNCTION plpgsql_oid_debug(oid) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: could not access file "$libdir/plugins/plugin_de bugger": No such file or directory
Command was: CREATE FUNCTION plpgsql_oid_debug(function oid oid) RETURNS integer
LANGUAGE c STRICT
AS '$libdir/plugins/plugin_de bu...
pg_restore: [archiver (db)] could not execute query: ERROR: function public.plpgsql_oid_debug(o id) does not exist
Command was: ALTER FUNCTION public.plpgsql_oid_debug(f unctionoid oid) OWNER TO postgres;
Thanks.
LINHA 1: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural languag...
^
Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';about
The issue $libdir/targetinfo and $libdir/plugins/plugin_deb
pg_restore: creating FUNCTION pldbg_get_target_info(text
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 909; 1255 28930 FUNCTION pldbg_get_target_info(text
pg_restore: [archiver (db)] could not execute query: ERROR: could not access file "$libdir/targetinfo": No such file or directory
Command was: CREATE FUNCTION pldbg_get_target_info(sign
LANGUAGE c STRICT
AS '$l...
pg_restore: [archiver (db)] could not execute query: ERROR: function public.pldbg_get_target_in
Command was: ALTER FUNCTION public.pldbg_get_target_in
pg_restore: creating FUNCTION plpgsql_oid_debug(oid)
pg_restore: [archiver (db)] Error from TOC entry 910; 1255 28939 FUNCTION plpgsql_oid_debug(oid) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: could not access file "$libdir/plugins/plugin_de
Command was: CREATE FUNCTION plpgsql_oid_debug(function
LANGUAGE c STRICT
AS '$libdir/plugins/plugin_de
pg_restore: [archiver (db)] could not execute query: ERROR: function public.plpgsql_oid_debug(o
Command was: ALTER FUNCTION public.plpgsql_oid_debug(f
Thanks.
ASKER
Earthman2,
I have tried install edb-debugger but it need source code , there isn´t rpm EDB to Centos .
Is there other way to understand why "$libdir/targetinfo" is need for restoure database ?
Do you know where I can found more information about targetinfo ?
Thank very much Earthman2
I have tried install edb-debugger but it need source code , there isn´t rpm EDB to Centos .
Is there other way to understand why "$libdir/targetinfo" is need for restoure database ?
Do you know where I can found more information about targetinfo ?
Thank very much Earthman2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.