Re: could not access file "$libdir/pg_buffercache": No such file or directory - Mailing list pgsql-general

From Albe Laurenz
Subject Re: could not access file "$libdir/pg_buffercache": No such file or directory
Date
Msg-id D960CB61B694CF459DCFB4B0128514C206F0834A@exadv11.host.magwien.gv.at
Whole thread Raw
In response to could not access file "$libdir/pg_buffercache": No such file or directory  (Royce Ausburn <royce.ml@inomial.com>)
List pgsql-general
Royce Ausburn wrote:
> I'm in the process of testing out Postgres 9.0 for production use.
I've been using it for development
> on my mac, a build from EnterpriseDB.  We've just installed a 9.0.5 on
an Ubuntu (Ubuntu 10.04.3 LTS)
> machine from a backport from lucid.  There's an existing 8.4.8
postgres install also on that machine,
> but as far as I'm aware the debs are set up so you can happily have
two installs side by side.
>
> I've dumped a test DB from my laptop and attempted to restore it on to
the ubuntu machine, but I see
> errors:
>
> royce@fishy:~$ createdb test
> royce@fishy:~$ pg_restore -d test --no-owner test_RTR.pgc
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 65; 1255 2194102
FUNCTION pg_buffercache_pages()
> persona
> pg_restore: [archiver (db)] could not execute query: ERROR:  could not
access file
> "$libdir/pg_buffercache": No such file or directory
>     Command was: CREATE FUNCTION pg_buffercache_pages() RETURNS SETOF
record
>     LANGUAGE c
>     AS '$libdir/pg_buffercache', 'pg_buffercache_...
>
>
> After looking around a bit, my theory on these errors is that my mac
has some contrib module installed
> that adds views to my test database, and those views have been
included in the dump.  The contrib
> module is apparently not installed on the ubuntu machine and hence the
restore can't create the views.
> Is this theory correct?  If so:
>
> - Can these errors be safely ignored? (not ideal, because I'll miss
other, real errors)
> - Is there some simple way I can prevent these views from being
emitted as part of the dump?
> - Is there some simple way I can prevent these views from being
restored from a dump that contains
> them?
> - Otherwise, how can I purge these contrib modules from my laptop?
>
> Otherwise, if my theory is incorrect, any hints as to what it might
be?

Your theory sounds correct since there is a contrib "pg_buffercache" and
the
error message indicates that the shared object cannot be found.

The best solution would be to drop
  FUNCTION pg_buffercache_pages()
and
  VIEW pg_buffercache
in the original database before dumping.

That way you can be sure that nothing else in the database depends on
these objects.

You can always reinstall the contrib if you need it.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: "J.V."
Date:
Subject: Re: stored procs
Next
From: John R Pierce
Date:
Subject: Re: stored procs