Обсуждение: problem with postgresql 7.2 recovery

Поиск
Список
Период
Сортировка

problem with postgresql 7.2 recovery

От
s.chava@wcom.com (Srinivasa Rao Chava)
Дата:
Hi I have installed postgresql 7.2. I took the backup with pg_dumpall
in postgresql7.1.3 and I tried to restore it in postgresql7.2 with the
following command.
psql -d template1 -f pgbackups.

it is not restoring  anything except creating databases, users, but no
objects.
Below is the full text of the output from recovery

[TNETC:/u01/app/pgsql/7.2.0] psql -d template1 -f pgbackups
You are now connected to database template1.
DELETE 6
CREATE USER
CREATE USER
CREATE USER
CREATE USER
CREATE USER
CREATE USER
DELETE 0
You are now connected to database template1 as user pgsql.
You are now connected to database template1 as user pgsql.
COMMENT
UPDATE 1
You are now connected to database template1 as user pgsql.
CREATE DATABASE
You are now connected to database mytest as user pgsql.
You are now connected as new user develop.
psql:pgbackups:62: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'announce_pkey' for table 'announce'
CREATE
REVOKE
GRANT
You are now connected as new user pgsql.
psql:pgbackups:80: ERROR:  stat failed on file
'/u01/app/pgsql/7.1.2/lib/plpgsql.so': No such file or directory
psql:pgbackups:88: ERROR:  PL handler function plpgsql_call_handler()
doesn't exist
CREATE
REVOKE
GRANT
GRANT
You are now connected as new user develop.
psql:pgbackups:138: ERROR:  Unrecognized language specified in a
CREATE FUNCTION: 'plpgsql'.
        Pre-installed languages are SQL, C, and internal.
        Additional languages may be installed using 'createlang'.
You are now connected as new user pldev.
CREATE
psql:pgbackups:164: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'ref_sla_pkey' for table 'ref_sla'
CREATE
psql:pgbackups:175: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'ref_srv_type_pkey' for table 'ref_srv_type'
CREATE
psql:pgbackups:186: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'ref_contact_type_pkey' for table 'ref_contact_type'
CREATE
psql:pgbackups:198: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'cust_realms_pkey' for table 'cust_realms'
CREATE
psql:pgbackups:218: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'nprivate_label_pkey' for table 'nprivate_label'
CREATE
psql:pgbackups:238: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'private_label_pkey' for table 'private_label'
CREATE
You are now connected as new user develop.
psql:pgbackups:272: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'contacts_two_pkey' for table 'contacts_two'
CREATE
psql:pgbackups:285: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'contact_groups_pkey' for table 'contact_groups'
CREATE
psql:pgbackups:303: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'announce_index_pkey' for table 'announce_index'
CREATE
psql:pgbackups:315: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'announce_manager_pkey' for table 'announce_manager'
CREATE
psql:pgbackups:338: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'events_calendar_two_pkey' for table
'events_calendar_two'
CREATE
psql:pgbackups:352: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'pk_extranet_section' for table 'extranet_section'
CREATE
psql:pgbackups:373: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'pk_extranet_docs' for table 'extranet_docs'
CREATE
psql:pgbackups:386: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'extranet_ids_pkey' for table 'extranet_ids'
CREATE
psql:pgbackups:403: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'pk_extranet_personfolderperms' for table
'extranet_personfolderperms'
CREATE
psql:pgbackups:419: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'pk_extranet_groupfolderperms' for table
'extranet_groupfolderperms'
CREATE
psql:pgbackups:440: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'wells_fargo_nciv_pkey' for table 'wells_fargo_nciv'
CREATE
psql:pgbackups:461: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'pk_extranet_bug' for table 'extranet_bug'
CREATE
psql:pgbackups:477: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'pk_extranet_bug_notes' for table 'extranet_bug_notes'
CREATE
psql:pgbackups:499: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'pk_extranet_bug_tasks' for table 'extranet_bug_tasks'
CREATE
psql:pgbackups:511: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'pk_extranet_bug_number' for table
'extranet_bug_number'
CREATE
psql:pgbackups:536: ERROR:  Unrecognized language specified in a
CREATE FUNCTION: 'plpgsql'.
        Pre-installed languages are SQL, C, and internal.
        Additional languages may be installed using 'createlang'.
psql:pgbackups:548: ERROR:  Unrecognized language specified in a
CREATE FUNCTION: 'plpgsql'.
        Pre-installed languages are SQL, C, and internal.
        Additional languages may be installed using 'createlang'.
psql:pgbackups:574: ERROR:  Unrecognized language specified in a
CREATE FUNCTION: 'plpgsql'.
        Pre-installed languages are SQL, C, and internal.
        Additional languages may be installed using 'createlang'.
psql:pgbackups:593: ERROR:  Unrecognized language specified in a
CREATE FUNCTION: 'plpgsql'.
        Pre-installed languages are SQL, C, and internal.
        Additional languages may be installed using 'createlang'.
psql:pgbackups:611: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'contact_description_pkey' for table
'contact_description'
CREATE
psql:pgbackups:632: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'phone_bank_nciv_pkey' for table 'phone_bank_nciv'
CREATE
You are now connected as new user pldev.
CREATE
You are now connected as new user pgsql.
CREATE
You are now connected as new user develop.
CREATE
You are now connected as new user pgsql.
psql:pgbackups:689: ERROR:  Unrecognized language specified in a
CREATE FUNCTION: 'plpgsql'.
        Pre-installed languages are SQL, C, and internal.
        Additional languages may be installed using 'createlang'.
psql:pgbackups:708: ERROR:  Unrecognized language specified in a
CREATE FUNCTION: 'plpgsql'.
        Pre-installed languages are SQL, C, and internal.
        Additional languages may be installed using 'createlang'.
CREATE
psql:pgbackups:733: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'authors_pkey' for table 'authors'
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
You are now connected as new user develop.
psql:pgbackups:843: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'financial_data_nciv_pkey' for table
'financial_data_nciv'
CREATE
psql:pgbackups:864: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'financial_voice_nciv_pkey' for table
'financial_voice_nciv'
CREATE
psql:pgbackups:885: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'home_mortgage_nciv_pkey' for table
'home_mortgage_nciv'
CREATE
CREATE
CREATE
You are now connected as new user pldev.
psql:pgbackups:920: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'ref_region_pkey' for table 'ref_region'
CREATE
psql:pgbackups:936: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'cust_profile_pkey' for table 'cust_profile'
CREATE
psql:pgbackups:947: NOTICE:  CREATE TABLE / PRIMARY KEY will create
implicit index 'ref_subregion_pkey' for table 'ref_subregion'
CREATE
You are now connected as new user pgsql.
CREATE
REVOKE
GRANT
GRANT
CREATE
You are now connected as new user develop.
CREATE
CREATE
You are now connected as new user pgsql.
You are now connected as new user pldev.
You are now connected as new user develop.
You are now connected as new user pldev.
You are now connected as new user pgsql.
You are now connected as new user develop.
You are now connected as new user pgsql.
You are now connected as new user develop.
You are now connected as new user pldev.
You are now connected as new user pgsql.
You are now connected as new user pldev.
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
You are now connected as new user develop.
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
psql:pgbackups:3052: ERROR:  CreateTrigger: function increment_bug()
does not exist
psql:pgbackups:3060: ERROR:  CreateTrigger: function initids() does
not exist
psql:pgbackups:3068: ERROR:  CreateTrigger: function
increment_section() does not exist
psql:pgbackups:3076: ERROR:  CreateTrigger: function increment_docs()
does not exist
You are now connected as new user pldev.
CREATE
CREATE
CREATE
psql:pgbackups:3109: ERROR:  mysequence.setval: you don't have
permissions to set sequence mysequence
You are now connected to database template1 as user pgsql.
CREATE DATABASE
psql:pgbackups:3117: \connect: FATAL 1:  Database "depg" does not
exist in the system catalog.
[TNETC:/u01/app/pgsql/7.2.0]

Re: problem with postgresql 7.2 recovery

От
Tom Lane
Дата:
s.chava@wcom.com (Srinivasa Rao Chava) writes:
> Hi I have installed postgresql 7.2. I took the backup with pg_dumpall
> in postgresql7.1.3 and I tried to restore it in postgresql7.2 with the
> following command.

I think the thing you need to fix is:

> psql:pgbackups:80: ERROR:  stat failed on file
> '/u01/app/pgsql/7.1.2/lib/plpgsql.so': No such file or directory

Evidently your dump file contains a hard-coded reference to an old
directory path.  You'll need to edit that.  I recommend making it
refer to just 'plpgsql', no path, no ".so".

            regards, tom lane