Re: Pg_upgrade error could not load library from 7.14/8.4 to 10.10version

Поиск
Список
Период
Сортировка
От Achilleas Mantzios
Тема Re: Pg_upgrade error could not load library from 7.14/8.4 to 10.10version
Дата
Msg-id 13f3ecf4-248e-eb80-3906-fd2defe8a443@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на Re: Pg_upgrade error could not load library from 7.14/8.4 to 10.10version  (Ekaterina Amez <ekaterina.amez@zunibal.com>)
Ответы Re: Pg_upgrade error could not load library from 7.14/8.4 to 10.10version
Список pgsql-admin
On 20/9/19 12:22 μ.μ., Ekaterina Amez wrote:
> Hi Achilleas,
>
> El 20/9/19 a las 9:26, Achilleas Mantzios escribió:
>> Just tested in my 11 and 10 :
>> dynacom=# select proname,probin,pronamespace from pg_proc where proname='plpgsql_call_handler';
>>        proname        |             probin              | pronamespace
>> ----------------------+---------------------------------+--------------
>>  plpgsql_call_handler | $libdir/plpgsql |           11
>>  plpgsql_call_handler | /usr/local/pgsql/lib/plpgsql.so | 2200
>> (2 rows)
>>
>> with 2200 being the public namespace/schema.
>>
>> I my case, in every postgresql installation since 2001, always libdir was /usr/local/pgsql/lib/ , so maybe this
problemcould not be manifested. Did you check to see if you have the 
 
>> plpgsql_call_handler defined in two schemas as well?
>>
>> -- 
>> Achilleas Mantzios
>> IT DEV Lead
>> IT DEPT
>> Dynacom Tankers Mgmt
>
>
> I've restored template1 in v8.4, and created again the db where I will be restoring v7.14 backup
>
> newdb=# select proname,probin,pronamespace from pg_proc where proname='plpgsql_call_handler';
>  proname | probin | pronamespace
> ---------+--------+--------------
> (0 filas)
>
>
> And in v10.10 (which is still an empty installation)
>
> template1=# select proname,probin,pronamespace from pg_proc where proname='plpgsql_call_handler';
>
>        proname        |     probin      | pronamespace
> ----------------------+-----------------+--------------
>  plpgsql_call_handler | $libdir/plpgsql |           11
> (1 row)
>
>
> After restoring backup in v8.4:
>
> newdb=# select proname,probin,pronamespace from pg_proc where proname='plpgsql_call_handler';
>        proname        |                 probin                 | pronamespace
> ----------------------+----------------------------------------+--------------
>  plpgsql_call_handler | $libdir/plpgsql |           11
>  plpgsql_call_handler | /usr/lib/postgresql/8.4/lib/plpgsql.so |         2200
> (2 filas)
>
> As you said, 2200 is public namespace/schema and 11 is pg_catalog.
>
>
> At the beginning of the backup file I can find these sentences:
>
> CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler
>     LANGUAGE c
>     AS '/usr/lib/postgresql/8.4/lib/plpgsql.so', 'plpgsql_call_handler'; <-- I've changed this line to use the right
pathto plpgsql.so library
 
>
> CREATE PROCEDURAL LANGUAGE plpgsql HANDLER plpgsql_call_handler;
>
> I guess these are the ones causing all of this. **What should be the best way to handle this situation?** Remove
theselines and create the language explicitly when creating database? 
 

Just drop the 2nd function (in the public schema) :
drop function public.plpgsql_call_handler ( ) ;
and see pg_upgrade goes from there.

> Or replace them with a create language sentence? Maybe something else? My final goal is migrate from 7.14 server to
8.4server and after that (if I have an OK from the boss) upgrade 8.4 to the 
 
> latest version that I can use. Server uses CentOS, and probably I won't be able to upgrade to v10 but I hope at least
9.5/9.6will be available.
 
>
>
>


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt




В списке pgsql-admin по дате отправления:

Предыдущее
От: Ekaterina Amez
Дата:
Сообщение: Re: Pg_upgrade error could not load library from 7.14/8.4 to 10.10version
Следующее
От: Ertan Küçükoğlu
Дата:
Сообщение: GUI tool for Raspberry Pi - PostgreSQL 11.5