errors in pg_restore on windows?
Using PostgreSQL 8.3 on Windows, I make a backup like this:
pg_dump -U postgres -C -d -D -Fc -f ispaaa-pg.bak ispaaa
Then restore like this:
pg_restore -U postgres -C -d template1 -v -Fc ispaaa-pg.bak
And I get lots of these errors:
pg_restore: creating TABLE voip
pg_restore: creating FUNCTION pldbg_abort_target(integer)
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 21; 1255 16419
FUNCTION pldbg_abort_target(integer) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: could not
load library "C:/Program Files (x86)/PostgreSQL/8.3/lib/pldbgapi.dll":
The specified module could not be found.
Command was: CREATE FUNCTION pldbg_abort_target(session integer) RETURNS SET
OF boolean
AS '$libdir/pldbgapi', 'pldbg_abort_target'
...
pg_restore: [archiver (db)] could not execute query: ERROR: function public.pld
bg_abort_target(integer) does not exist
Command was: ALTER FUNCTION public.pldbg_abort_target(session integer) OWNER
TO postgres;
It looks like a packaging issue with the windows installer - these
commands work fine for me on Linux.
Thanks,
Dan
Ok, it turns out that the fact that my pg_restore won't work on
windows is directly related to this (from a couple days ago)
"Dan Armbrust" <daniel.armbrust.list@gmail.com> writes:
To follow up on my old thread -
I tested another install of Postgres 8.3.0.1 - and on windows, the
postgresql.conf file has this in it:
shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll' #
(change requires restart)
I got the impression that that debugger wasn't intended to be enabled,
by default. It looks like the windows installer is enabling it,
however.
It turns out, that commenting out the "shared_preload_libraries" in
the postgresql.conf file breaks pg_restore.
So, perhaps that shouldn't be disabled by default in the installer.
Dan
On Thu, Feb 28, 2008 at 5:13 PM, Dan Armbrust
<daniel.armbrust.list@gmail.com> wrote:
Show quoted text
Using PostgreSQL 8.3 on Windows, I make a backup like this:
pg_dump -U postgres -C -d -D -Fc -f ispaaa-pg.bak ispaaaThen restore like this:
pg_restore -U postgres -C -d template1 -v -Fc ispaaa-pg.bakAnd I get lots of these errors:
pg_restore: creating TABLE voip
pg_restore: creating FUNCTION pldbg_abort_target(integer)
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 21; 1255 16419
FUNCTION pldbg_abort_target(integer) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: could not
load library "C:/Program Files (x86)/PostgreSQL/8.3/lib/pldbgapi.dll":
The specified module could not be found.Command was: CREATE FUNCTION pldbg_abort_target(session integer) RETURNS SET
OF boolean
AS '$libdir/pldbgapi', 'pldbg_abort_target'
...
pg_restore: [archiver (db)] could not execute query: ERROR: function public.pld
bg_abort_target(integer) does not exist
Command was: ALTER FUNCTION public.pldbg_abort_target(session integer) OWNER
TO postgres;It looks like a packaging issue with the windows installer - these
commands work fine for me on Linux.Thanks,
Dan
"Dan Armbrust" <daniel.armbrust.list@gmail.com> writes:
It turns out, that commenting out the "shared_preload_libraries" in
the postgresql.conf file breaks pg_restore.
It hardly "breaks" anything. The errors you show just indicate that you
had the plpgsql debugger loaded into your database.
regards, tom lane
Sorry, I don't follow.
If I disable that debugger library in the config file, create a
database, backup the database, and then restore the database, I get
many errors - all similar to the one I posted before.
They are reported at the end of the restore as errors.
Are you saying they are really just warnings?
Thanks,
Dan
Show quoted text
On Fri, Feb 29, 2008 at 10:19 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Dan Armbrust" <daniel.armbrust.list@gmail.com> writes:
It turns out, that commenting out the "shared_preload_libraries" in
the postgresql.conf file breaks pg_restore.It hardly "breaks" anything. The errors you show just indicate that you
had the plpgsql debugger loaded into your database.regards, tom lane
Dan Armbrust escribi�:
Sorry, I don't follow.
If I disable that debugger library in the config file, create a
database, backup the database, and then restore the database, I get
many errors - all similar to the one I posted before.They are reported at the end of the restore as errors.
Are you saying they are really just warnings?
They only mean that the debugger functions could not be loaded. If
you're not using the debugger, they are irrelevant -- in a way, they are
"just warnings".
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
"Dan Armbrust" <daniel.armbrust.list@gmail.com> writes:
If I disable that debugger library in the config file, create a
database, backup the database, and then restore the database, I get
many errors - all similar to the one I posted before.
Perhaps you've got those functions loaded into template1?
Are you saying they are really just warnings?
Well, they're errors in the sense that those functions didn't get
restored. But if you're trying to remove the plpgsql debugger,
I think that's what you want.
regards, tom lane
I didn't do anything specific to load those functions into template1.
I was under the impression that that particular debugger wasn't
supposed to be on by default on windows - and that it was an installer
oversight - and that you may turn it off by default for future builds
of the windows installer.
But that seems to lead the pg_restore function to report errors -
which would certainly scare my users.
Perhaps I didn't disable it properly.
If your not concerned about it, I won't be either. I'll just stop
turning off that debug flag.
I guess it's all a moot point if no changes were planned to the
windows installer WRT that debug setting.
Thanks,
Dan
Show quoted text
On Fri, Feb 29, 2008 at 11:05 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Dan Armbrust" <daniel.armbrust.list@gmail.com> writes:
If I disable that debugger library in the config file, create a
database, backup the database, and then restore the database, I get
many errors - all similar to the one I posted before.Perhaps you've got those functions loaded into template1?
Are you saying they are really just warnings?
Well, they're errors in the sense that those functions didn't get
restored. But if you're trying to remove the plpgsql debugger,
I think that's what you want.regards, tom lane