Re: pg_upgrade: out of memory

From: "Carrington, Matthew (Produban)" <Matthew(dot)Carrington(at)Produban(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_upgrade: out of memory
Date: 2012-09-28 14:58:09
Message-ID: 53E23B63FBFF3645A2CDD9BE5933C60C8B1194EDF5@ENTAAP2407P.an.ad.anplc.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom,

OK, here you go ...

Rebuild postgres with debugging ...

export OBJECT_MODE=64
export CFLAGS="-maix64"
export LDFLAGS="-maix64 -Wl,-bbigtoc"
export AR="ar -X64"

./configure --enable-debug --prefix=/opt/serviceMonitoring/postgres_9.2.1 --disable-thread-safety

make
cd contrib
make
cd ..
make install
cd contrib
make install

... get the backtrace ...

cd /tmp
gdb "/opt/serviceMonitoring/postgres_9.2.1/bin/pg_dump"
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-ibm-aix5.1.0.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /ukmetmon/data/dataCollection/postgres_9.2.1/bin/pg_dump...(no debugging symbols found)...done.
(gdb) b exit_horribly
Breakpoint 1 at 0x1002e354
(gdb) run --port 65432 --username "postgres" --verbose --schema-only --binary-upgrade -f dump.out template1
Starting program: /ukmetmon/data/dataCollection/postgres_9.2.1/bin/pg_dump --port 65432 --username "postgres" --verbose --schema-only --binary-upgrade -f dump.out template1
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading extensions
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions

Breakpoint 1, 0x000000010002e354 in exit_horribly ()
(gdb) bt
#0 0x000000010002e354 in exit_horribly ()
#1 0x000000010003243c in pg_malloc ()
#2 0x0000000100008f14 in getAggregates ()
#3 0x000000010002fcac in getSchemaData ()
#4 0x0000000100001330 in main ()
(gdb) quit
A debugging session is active.

Inferior 1 [process 241858] will be killed.

Quit anyway? (y or n) y

... hope that helps.

Matthew

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: 28 September 2012 15:16
To: Carrington, Matthew (Produban)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] pg_upgrade: out of memory

"Carrington, Matthew (Produban)" <Matthew(dot)Carrington(at)Produban(dot)co(dot)uk> writes:
> I've tried to explore the issue a bit more using 9.2.1. Here's a trace of the build and dump tests ...

As long as you're building your own copy, how about building with
--enable-debug and getting a stack trace showing where the error is
being thrown? Setting a breakpoint at exit_horribly() ought to do
the trick. To be concrete:

gdb pg_dump
gdb> b exit_horribly
gdb> run --port 65432 ... rest of command line for pg_dump ...
... wait for breakpoint to be hit, then ...
gdb> bt
... copy and paste the printout here ...
gdb> quit

regards, tom lane
Emails aren't always secure, and they may be intercepted or changed
after they've been sent. Produban doesn't accept liability if this
happens. If you think someone may have interfered with this email,
please get in touch with the sender another way. This message and any
documents attached to it do not create or change any contract unless
otherwise specifically stated. Any views or opinions contained in this
message are solely those of the author, and do not necessarily represent
those of Produban, unless otherwise specifically stated and the sender
is authorised to do so. Produban doesn't accept responsibility for
damage caused by any viruses contained in this email or its attachments.
Emails may be monitored. If you've received this email by mistake,
please let the sender know at once that it's gone to the wrong person
and then destroy it without copying, using, or telling anyone about its
contents. Produban Servicios Informaticos Generales, S.L. (UK Branch).
Registered office: Shenley Wood House, Chalkdell Drive, Shenley Wood,
Milton Keynes MK5 6LA. Branch registration number BR 008486.
Ref:[PDB#014]

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-09-28 15:12:11 Re: pg_upgrade: out of memory
Previous Message Tom Lane 2012-09-28 14:15:33 Re: pg_upgrade: out of memory