From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "'Leonid Rozenblyum *EXTERN*'" <lrozenblyum(at)gmail(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: 8.4 to 9.4 migration - recommended practices |
Date: | 2015-04-21 08:32:07 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B365DC018@ntex2010a.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Leonid Rozenblyum wrote:
> I'm working on migrating a single database from cluster of postgresql
> 8.4 db to 9.4.
>
> I'm using pg_dump & pg_restore from 9.4 version.
>
> I'm using a limited account to dump/restore the data (NOT postgres user)
>
> During pg_restore I get 2 kinds of errors:
>
> 1)
> Lack of permissions:
>
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 1070; 2612 37119
> PROCEDURAL LANGUAGE plpgsql postgres
> pg_restore: [archiver (db)] could not execute query: ERROR: must be
> owner of language plpgsql
> Command was: CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;
That is no problem.
PL/pgSQL is now automatically installed during CREATE DATABASE and
belongs to the superuser.
> 2) Absense of a function:
>
> pg_restore: [archiver (db)] could not execute query: ERROR: function
> public.plpgsql_call_handler() does not exist
> Command was: ALTER FUNCTION public.plpgsql_call_handler() OWNER TO postgres;
Again, that's part of PL/pgSQL:
test=> SELECT * FROM pg_pltemplate WHERE tmplname = 'plpgsql';
-[ RECORD 1 ]-+-----------------------
tmplname | plpgsql
tmpltrusted | t
tmpldbacreate | t
tmplhandler | plpgsql_call_handler
tmplinline | plpgsql_inline_handler
tmplvalidator | plpgsql_validator
tmpllibrary | $libdir/plpgsql
tmplacl |
It looks like the functions were installed in schema "public" in the
8.4 database.
What I wonder is why there is no "CREATE FUNCTION public.plpgsql_call_handler()"
in the database dump.
> Are both kinds of errors worth to worry about?
I would assume that your new database is ok.
At worse, you'll have a few old and obsolete functions sitting around
in schema "public".
Testing is never a mistake though.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | jaime soler | 2015-04-22 15:35:24 | Re: pgdump with batch insert |
Previous Message | Leonid Rozenblyum | 2015-04-21 07:58:36 | 8.4 to 9.4 migration - recommended practices |