pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedFATAL: 1 Memory exhausted in AllocSetAlloc()
3+ messages / 3 participants
[nested] [flat]
* FATAL: 1 Memory exhausted in AllocSetAlloc()
@ 2000-10-31 08:32 Igor N. Avtaev <ain@usi.ru>
0 siblings, 0 replies; 3+ messages in thread
From: Igor N. Avtaev @ 2000-10-31 08:32 UTC (permalink / raw)
To: pgsql-admin
Hello all! Help me please!
I'm having the table "mytable":
CREATE TABLE mytable (
a1 char(6) not null,
a2 char(1) not null,
a3 char(15) not null,
S1 char(8) not null,
S2 char(6) not null,
a4 integer not null,
a5 integer not null
);
I'm having a trouble with follow SQL-query:
SELECT min(S1 || S2), max(S1 || S2) FROM mytable;
If the table in question is the not large in the database -- about 120
000 rows
then execution OK.
If the table in question -- about 160 000 rows
then not execution.
Postmaster output to stderr:
FATAL: 1 Memory exhausted in AllocSetAlloc()
Please, tell me - what can I do?!
------------------------------------------------------------------------------
DBMS: PostgreSQL 7.0.2
OS: SCO UnixWare 2.1.3
Machine: HP Netserver E30, Pentium 166, 128Mb RAM, 4Gb and 9Gb Wide-SCSI
HDD
Best regards,
Igor Avtaev
^ permalink raw reply [nested|flat] 3+ messages in thread
* FATAL 1: Memory exhausted in AllocSetAlloc()
@ 2001-01-11 11:56 Thomas Heller <th.heller@comtron.net>
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Heller @ 2001-01-11 11:56 UTC (permalink / raw)
To: pgsql-admin
Hi there!
The last db-crash (kernel panic) caused a little error on my db-files i
think. After the crash i had to recreate some indexes but no data were lost.
Everything is running quite ok now, except for one BIG error.
The postgres process crashes every now and then without giving any
information on any reasons. :( AND I can't use pg_dumpall, vacuumdb -z. All
the time I run a program that is supposed to dump my database or analyze it.
I get the following error from the program:
FATAL 1: Memory exhausted in AllocSetAlloc()
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
connection to server was lost
vacuumdb: vacuum failed
pg_dumpall: pg_dumpall failed
I'm running a postgres-7.0.3 on a p3-800 with 768mb ram. postgres is the
only thing running on that machine. The Database Directory is 500mb big. I
have several tables (some arround 5k entries and about 5 tables are >100k
entries). The DB is heavy loaded (linux load of 6-20 at main time) and I
plan to move it to a bigger machine. The only problem is that i can't dump
my db. :(
Somebody got any advices how I can dump or vacuum my db again?
thanks in advance,
thomas
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: FATAL 1: Memory exhausted in AllocSetAlloc()
@ 2001-01-11 17:18 Tom Lane <tgl@sss.pgh.pa.us>
parent: Thomas Heller <th.heller@comtron.net>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2001-01-11 17:18 UTC (permalink / raw)
To: Thomas Heller <th.heller@comtron.net>; +Cc: pgsql-admin
"Thomas Heller" <th.heller@comtron.net> writes:
> [ after a system crash, I'm getting ]
> FATAL 1: Memory exhausted in AllocSetAlloc()
An educated guess is that you have a corrupted tuple in some table,
within which a variable-length datum is corrupted in some way that
makes it appear to have a size of hundreds of megabytes (more than
your allowed process swap space, anyway). VACUUM ANALYZE, or anything
else that tries to examine the corrupted datum, will start out by
trying to palloc() as much space as the datum's length word says it
needs. Malloc failure leads to the above complaint and emergency
stop. No (further) harm done to your table, fortunately.
What you want to do is narrow down the location of the bad tuple (or
tuples; there might be more than one) and then delete it. It should
be easy enough to determine which table(s) contain bad data --- one
way is to VACUUM ANALYZE tables one at a time to see which ones fail.
To locate the bad tuple, one way is to do
SELECT * FROM foo LIMIT n;
for various n and see which queries succeed and which don't. With
a little bit of homing in, you can determine that the n'th tuple of
the table is broken. Then you can do something like
SELECT oid FROM foo OFFSET n-1 LIMIT 1;
DELETE FROM foo WHERE oid = value-just-determined;
to zap the tuple without trying to examine its corrupted column.
Repeat if necessary until all tables are clean ...
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-01-11 17:18 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-31 08:32 FATAL: 1 Memory exhausted in AllocSetAlloc() Igor N. Avtaev <ain@usi.ru>
2001-01-11 11:56 FATAL 1: Memory exhausted in AllocSetAlloc() Thomas Heller <th.heller@comtron.net>
2001-01-11 17:18 ` Re: FATAL 1: Memory exhausted in AllocSetAlloc() Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox