Re: Database broken after using pgadmin 'backup' on OSX - Mailing list pgadmin-support

From Darren Duncan
Subject Re: Database broken after using pgadmin 'backup' on OSX
Date
Msg-id ec88464b-6680-df6d-ee8c-2721eb0e4f10@darrenduncan.net
Whole thread Raw
In response to Database broken after using pgadmin 'backup' on OSX  (Conor McNally <theconor@gmail.com>)
Responses Re: Database broken after using pgadmin 'backup' on OSX  (Conor McNally <theconor@gmail.com>)
List pgadmin-support
On 2017-06-29 1:06 PM, Conor McNally wrote:
> By 'no longer working' it means that the postrges libraries have been messed up
> and I get the following error when I try to connect via pyscopg2 (python
> v3.5.2_3, pyscopg2 v2.6.2):
>
>   File
> "/Users/conor/virt_env/conor/lib/python3.5/site-packages/psycopg2/extras.py",
> line 288, in execute
>     return super(NamedTupleCursor, self).execute(query, vars)
> psycopg2.InternalError: could not load library
> "/usr/local/lib/postgresql/plpgsql.so":
> dlopen(/usr/local/lib/postgresql/plpgsql.so, 10): Symbol not found:
> _DatumIsReadWriteExpandedObject
>   Referenced from: /usr/local/lib/postgresql/plpgsql.so
>   Expected in: /usr/local/opt/postgresql/bin/postgres
>  in /usr/local/lib/postgresql/plpgsql.so
>
>
> I find the only way to fix the problem is to run "brew switch postgresql
> 9.6.2".  I don't really know what that command does but the database connections
> are OK after I run it.  Also, the database backup file has been created
> successfully as far as I can tell: I have not yet attempted to restore it.  One
> other thing is I don't get a confirmation message in the pgAdmin console the way
> I used to.

I'll tell you what that command does.

I have some experience with perlbrew/brew, which is a package manager of sorts 
that supports having multiple concurrent installations of different versions of 
something, and also or typically builds from source.

The "switch" command basically updates some symlinks for some installed thing so 
that a specific version is referenced by them.  For example, if you had versions 
X and Y of package Foo installed, you use "brew switch" to indicate that when 
you invoke "Foo" you get either version X or Y.
 $ brew help switch brew switch name version:    Symlink all of the specific version of name's install to Homebrew
prefix.

It would appear that something was changing your symlinks.  Or possibly a local 
shell path was being altered.

I can't tell you what is making these changes though.

-- Darren Duncan




pgadmin-support by date:

Previous
From: "David Lloyd"
Date:
Subject: RE: Database broken after using pgadmin 'backup' on OSX
Next
From: Palmetzhofer Dietmar
Date:
Subject: PGAdmin 4 1.5 desktop mode not starting on Windows 7 64 bit