View Single Post

   
  #8 (permalink)  
Old 05-18-2008, 11:03 PM
Heikki Linnakangas
 
Posts: n/a
Default Re: Arbitary file size limit in twophase.c

Tom Lane wrote:
> "Heikki Linnakangas" <heikki@enterprisedb.com> writes:
>> Tom Lane wrote:
>>> It might be worth checking at prepare that the file size doesn't exceed
>>> MaxAllocSize, but any smaller limit strikes me as (a) unnecessarily
>>> restrictive and (b) not actually creating any useful guarantee.

>
>> Patch attached. I can't commit it myself right now, but will do so as
>> soon as I can, unless there's objections.

>
> Two bugs: "exceeed" -> "exceeded", please;


Thanks.

> and on the read side, you
> should still have an upper-bound check, but it should be MaxAllocSize.


That seems like a highly unlikely failure scenario, where a two-phase
file is corrupt file so that it becomes larger than 1GB. It's not like
the check costs anything either, though, so I'll just put it back like
you suggested.

Updated patch attached. I think it's ok now, but I'll air this as a
patch before committing since I got it wrong before...

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply With Quote