Tom Lane wrote:
Jochem van Dieten <jochemd@xxxxxxxxxxxxxx> writes:
Below I have copy pasted the console log which has some
additional information. This bug, or a related one, seems to have
been registered previously as bug #1455
http://archives.postgresql.org/pgsql-bugs/2005-02/msg00021.php
Yeah. We never heard back from that person, so I thought he'd resolved
his problem, but maybe there's something in common.
It's *really* odd that you can do the same command by hand and it
doesn't fail. Just to get the Windows version out of the loop:
if you run 7.3's own pg_dump directly on the BSD box, does it fail
the same way?
That fails due to a pg_dump issue that was fixed in 7.4:
http://archives.postgresql.org/pgsql-general/2003-01/msg00006.php
The only way I can think of to get more info is to try to get a
stack trace for the error --- that is, attach to the backend process
with gdb, set a breakpoint at elog, let it run till the error occurs,
and then "bt" to see how control got to the failure. Can you do that?
OpenBSD man pages are said to be very good :)
It will help if you do something like
export PGOPTIONS="-W 30"
on the client side before starting pg_dump --- that will provide a
30-second delay during connection to give you time to identify the
connected backend and attach to it with gdb.
On Windows that would be 'set PGOPTIONS="-W 30"'. Once I do that,
I get the following error:
C:\Program Files\PostgreSQL\8.0\bin>set PGOPTIONS="-W 30"
"z:\backup\databases\2005-06-06\wedstrijdzeilen.sql"
WARNING: postgres: invalid command line arguments
Try -? for help.
pg_dump: [archiver (db)] connection to database "wedstrijdzeilen" failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
(pg_dump -? appears to suggest that -W is used for the "force
password prompt" connection option.)
Exclusively locking pg_proc from another connection is also a
nice way to slow down pg_dump :)
pgsql@hector:/usr/local/pgsql/bin> gdb attach 7761
warning: failed to install memory consistency checks;
configuration should define NO_MMCHECK or MMCHECK_FORCE
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License,
and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty"
for details.
This GDB was configured as "i386-unknown-openbsd3.2"...
attach: No such file or directory.
/usr/local/pgsql/bin/7761: No such file or directory.
Attaching to process 7761
0x403ca553 in ?? ()
(gdb) symbol-file postmaster
Reading symbols from postmaster...done.
(gdb) break elog
Breakpoint 1 at 0x16d8f8
(gdb) bt
#0 0x403ca553 in ?? () from /usr/lib/libc.so.28.5
#1 0x10e604 in mdread ()
#2 0x10f31f in smgrread ()
#3 0x103827 in ReadBufferInternal ()
#4 0x1035ea in ReadBuffer ()
#5 0x16fc5 in _bt_getbuf ()
#6 0x19da0 in _bt_step ()
#7 0x1941d in _bt_next ()
#8 0x17573 in btgettuple ()
#9 0x170523 in FunctionCall2 ()
#10 0x1330d in index_getnext ()
#11 0x12dac in systable_getnext ()
#12 0xa5a3b in RelationBuildTriggers ()
#13 0x167849 in RelationBuildDesc ()
#14 0x168837 in RelationIdGetRelation ()
#15 0xd378 in relation_open ()
#16 0x992d8 in LockTableCommand ()
#17 0x114c11 in ProcessUtility ()
#18 0x110a3a in pg_exec_query_string ()
#19 0x112a91 in PostgresMain ()
#20 0xf4eae in DoBackend ()
#21 0xf463d in BackendStartup ()
#22 0xf3040 in ServerLoop ()
#23 0xf2502 in PostmasterMain ()
#24 0xc9926 in main ()
(gdb) detach
Detaching from program: process 7761
(gdb) quit
pgsql@hector:/usr/local/pgsql/bin>
Jochem
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
message can get through to the mailing list cleanly