Skip site navigation (1) Skip section navigation (2)

Re: ERROR: invalid memory alloc request size <a_big_number_here>

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Matteo Beccati <php(at)beccati(dot)com>,Martijn van Oosterhout <kleptog(at)svana(dot)org>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: ERROR: invalid memory alloc request size <a_big_number_here>
Date: 2005-10-27 14:23:07
Message-ID: 18713.1130422987@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> I think the problem is that CreateMultiXactId calls
> GetNewMultiXactId and then RecordNewMultiXact, and the lock is released
> between the calls.  So one backend could try to read the offset before
> another one had the time to finish writing it.

Ugh, yes, that is clearly a hole :-( even if it turns out not to explain
Matteo's observation.

I don't see any easy way to fix this except by introducing a lot more
locking than is there now --- ie, holding the MultiXactGenLock until the
new mxact's starting offset has been written to disk.  Any better ideas?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Martijn van OosterhoutDate: 2005-10-27 14:34:48
Subject: Re: ERROR: invalid memory alloc request size <a_big_number_here>
Previous:From: Matteo BeccatiDate: 2005-10-27 14:18:43
Subject: Re: ERROR: invalid memory alloc request size <a_big_number_here>

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group