Gavin Hamill wrote:
Seneca Cunningham wrote:
You're using a 32-bit build with the default memory model, it would
seem. You're limited to less than 256MB for the heap in that model.
Try stopping the postmaster and starting it back up with the
environment variable LDR_CNTRL set to "MAXDATA=0x80000000". This
expands the heap to 2GB and if it helps, you can use ldedit on your
postgres binaries to make that the default (or rebuild, passing the
linker "-bmaxdata:0x80000000").
Yep you're right on the money with default everything, and the kernel is
indeed 32-bit. Still a bit of a mixed bag tho :)
Builds default to 32-bit even with a 64-bit kernel in use. 64-bit
binaries can be built and used even with a 32-bit kernel just so long as
the underlying hardware is 64-bit and 64-bit mode is enabled. You have
64-bit hardware.
Last night, I passed
$ LDR_CNTRL="MAXDATA=0x8000000" bin/pg_ctl start -D /usr/local/pgsql/share/
Which immediately threw back an 'shm' error that the process table was
full, so I tried with a more modest 0x4000000 request and that worked a
treat; autovac ran fine and a full pg_restore completed perfectly -
hurrah! :)
This morning, however, pg starts with either 0x8000000 or 0x4000000,
but I am right back at square one with the same messages when autovac
fires:
"2006-03-29 09:18:45 BSTERROR: out of memory
2006-03-29 09:18:45 BSTDETAIL: Failed on request of size 268435452." so
I'm at a loss :)
Are "0x8000000" and "0x4000000" typos in this message, or did you really
request less than 256MB? Those numbers are the number of bytes
requested for the heap and memory is set aside in 256MB segments.
Would it be better to 'Enable 64-bit application environment' as the
option in 'smitty' has kept tempting me with? Or use the AIX 64-bit
kernel instead? Or both? :)) I'm using gcc 4.1.0 to compile pg - would I
need to recompile with any particular flags for 64-bit goodness?
The 64-bit application environment allows you to use 64-bit apps with a
32-bit kernel. Your hardware is intended for use with the 64-bit kernel.
If you want a 64-bit postgres, you will need to recompile. Set
OBJECT_MODE to 64 before running ./configure, and pass CC="gcc -maix64"
and LDFLAGS="-Wl,-bbigtoc" to ./configure. OBJECT_MODE tells the
linker, assembler, archiver, and other AIX build tools to operate on
64-bit objects. "-maix64" is the flag to tell gcc to use the 64-bit AIX
ABI. "-bbigtoc" tells the linker that it is allowed to generate a toc
greater than 64KB if needed (it will be).
If you do switch to a 64-bit build, you will need to re-initdb. I have
heard that the statistics collector of a 64-bit build may have some
problems, but it does pass "gmake check".
--
Seneca Cunningham
scunning@xxxxxxxxxxxxxxx