Re: Database broken after using pgadmin 'backup' on OSX

From: Conor McNally <theconor(at)gmail(dot)com>
To: pgadmin-support(at)lists(dot)postgresql(dot)org
Subject: Re: Database broken after using pgadmin 'backup' on OSX
Date: 2017-06-29 21:59:55
Message-ID: CAN6k=iHdWV3=TCxw6U5e2aW4w1g-Ogd-dBGuyhm9aSxGQqtR-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

Yes I do have two versions of plpgsql.so but it wasn't a problem before.

>locate plpgsql.so
/usr/local/Cellar/postgresql/9.5.3/lib/postgresql/plpgsql.so
/usr/local/Cellar/postgresql/9.6.2/lib/postgresql/plpgsql.so

Previously I performed backup using the earlier version of pgAdmin 4 and
before that I used pgAdmin 3.

All terminals are affected immediately after running the backup tool:
before and after reboot. The "brew switch" command is the only thing I've
found that fixes it.

I don't really know how brew works though. Do you think there something I
can do to fix my set-up?

Cheers,

Conor

On Thu, Jun 29, 2017 at 10:32 PM, David Lloyd <lloy0076(at)adam(dot)com(dot)au> wrote:

>
> By no means an expert but I see:
>
> * An environment installed using 'brew'
> * Some virt_env
> * A mish-mash of libraries from different lib directories in the error
>
> I know this sounds ridiculous, but I wonder if the OP performed the task
> until such time they got the error. And then rebooted (or at least
> logged out and logged in - i.e. clear their library paths, library cache
> and so forth which is best guaranteed by a reboot but at least logging
> out and maybe starting a new terminal).
>
> I'd hedge a bet there's more than one `plgpsql.so` on the system and
> they're subtly incompatible with each other.
>
> DSL
>
> > -----Original Message-----
> > From: Dave Page [mailto:dpage(at)pgadmin(dot)org]
> > Sent: Thursday, 29 June 2017 5:20 PM
> > To: Conor McNally <theconor(at)gmail(dot)com>
> > Cc: pgadmin-support(at)lists(dot)postgresql(dot)org
> > Subject: Re: Database broken after using pgadmin 'backup' on OSX
> >
> >
> >
> > > On 29 Jun 2017, at 21:06, Conor McNally <theconor(at)gmail(dot)com>
> > wrote:
> > >
> > > Hi,
> > >
> > > Can anyone help with the following problem?
> > >
> > > Since upgrading to pgAdmin 4 v1.5 on macOS Sierra (v10.12.5), it
> seems
> > my database is 'broken' every time I use the pgAdmin 'Backup' tool.
> > >
> > > Here's what happens:
> > > * macOS Sierra v10.12.5
> > > * postgres 9.6.2 locally installed with brew
> > > * pgAdmin 4 v1.5 installed directly from website
> > > * database is running fine
> > > * use the pgAdmin Tools / Backup... utility to take a full back-up
> > > * database is no longer working
> > >
> > > 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.
> > >
> > > Can anybody help with the above problem? It has only started
> > happening since I upgraded to pgAdmin 4 v1.5. Before that (with
> > pgAdmin 4 v1.4) everything was fine.
> >
> > pgAdmin uses it's own private virtual environment (including libpq and
> > friends). I honestly don't see how it could affect the system Python,
> let
> > alone a virtual envy from a completely different version.
>
>
>

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message David Lloyd 2017-06-29 22:58:22 RE: Database broken after using pgadmin 'backup' on OSX
Previous Message David Lloyd 2017-06-29 21:32:39 RE: Database broken after using pgadmin 'backup' on OSX