Re: Removing pg_trgm Extension - Upgraded from 9.1 to 9.5

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Chuck Reed <chuckreed(at)worleyco(dot)com>
Cc: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Removing pg_trgm Extension - Upgraded from 9.1 to 9.5
Date: 2017-01-06 19:44:09
Message-ID: CAKFQuwbdO-s7u8T+Se_tEpFh+TQ-LF1P2o6aQrVO_eK9Ah_WDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Fri, Jan 6, 2017 at 12:40 PM, Chuck Reed <chuckreed(at)worleyco(dot)com> wrote:

> Hi everyone,
>
>
>
> We have recently upgraded from postgres 9.1 to 9.5. When we create a
> database dump from 9.5 and attempt to restore it on another 9.5 server, we
> are running into the following warnings retarding the pg_trgm extension:
>
>
>
> pg_restore: WARNING: type input function gtrgm_in should not be volatile
>
> pg_restore: WARNING: type output function gtrgm_out should not be volatile
>
>
>
> I’m assuming these functions were added from the 9.1 extension and should
> be re-created from the 9.5 extension. This led me to try dropping the
> current pg_trgm extension, but it seems like the database doesn’t recognize
> it was already created:
>
>
>
> =# drop extension pg_trgm;
>
> ERROR: extension "pg_trgm" does not exist
>
>
>
> Trying to re-create the extension doesn’t complain that it’s already
> installed, but fails due to the functions already being in place:
>
>
>
> =# create extension pg_trgm;
>
> ERROR: function "set_limit" already exists with same argument types
>
>
>
> We haven’t run into this issue before and I am looking for advice on how
> to proceed. Should we just manually drop all of the tables associated with
> pg_trgm and then attempt to use CREATE EXTENSION again? Any help is greatly
> appreciated.
>
>
>

​See comment regarding "unpackaged" (under old_version) here:

​https://www.postgresql.org/docs/9.6/static/sql-createextension.html

Ideally you can do this on the 9.1 server which then should make the
upgrade go smoothly.

David J.

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Willy-Bas Loos 2017-01-11 15:03:21 python version, desktop mode (pgAdmin4)
Previous Message Chuck Reed 2017-01-06 19:40:05 Removing pg_trgm Extension - Upgraded from 9.1 to 9.5