Re: server crash in very big transaction [postgresql 8.0beta1]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: ?????? <jiangwei_1976(at)yahoo(dot)com(dot)cn>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: server crash in very big transaction [postgresql 8.0beta1]
Date: 2004-08-24 22:10:40
Message-ID: 12617.1093385440@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> On Sun, Aug 22, 2004 at 09:39:07AM +0800, ?????? wrote:
>> PANIC: invalid xlog record length 236052

> Huh, so what kind of operations did you execute within the transaction?

I found one possible explanation, though I don't know if it's the
submitter's problem or not. Create a SQL file that generates a whole
lot of subtransactions, like more than 16000. I used

begin;
create table foo(d1 int);
drop table foo;
savepoint x;
release x;
-- repeat above 2 lines 20000 times
commit;

First try gave me

WARNING: out of shared memory
ERROR: out of shared memory
HINT: You may need to increase max_locks_per_transaction.
WARNING: StartAbortedSubTransaction while in START state
ERROR: current transaction is aborted, commands ignored until end of transaction block
ERROR: current transaction is aborted, commands ignored until end of transaction block
... etc ...

which is fine except for the StartAbortedSubTransaction warning; that
may indicate a problem. (What do you think about it, Alvaro?)

I bumped up max_locks_per_transaction to 1000 and tried again, and got

psql:zzbig.sql:40004: PANIC: invalid xlog record length 80024
server closed the connection unexpectedly

What is happening of course is that more than 16K subtransaction IDs
won't fit in a commit record (since XLOG records have a 16-bit length
field). We're gonna have to rethink the representation of subxact
commit in XLOG.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-08-24 23:24:28 Re: [BUGS] server crash in very big transaction [postgresql 8.0beta1]
Previous Message PostgreSQL Bugs List 2004-08-24 20:52:29 BUG #1230: mirror problem

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-24 23:24:28 Re: [BUGS] server crash in very big transaction [postgresql 8.0beta1]
Previous Message Greg Stark 2004-08-24 21:47:39 Re: 8.0 beta 1 on linux-mipsel R5900