Re: [HACKERS] Arbitary file size limit in twophase.c

2008-05-16 Thread Heikki Linnakangas
Tom Lane wrote: "Heikki Linnakangas" <[EMAIL PROTECTED]> 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 at

Re: [HACKERS] Arbitary file size limit in twophase.c

2008-05-16 Thread Tom Lane
"Heikki Linnakangas" <[EMAIL PROTECTED]> 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.

Re: [HACKERS] Arbitary file size limit in twophase.c

2008-05-16 Thread Heikki Linnakangas
Tom Lane wrote: "Heikki Linnakangas" <[EMAIL PROTECTED]> writes: If we're going to check for file length, we should definitely check the file length when we write it, so that we fail at PREPARE time, and not at COMMIT time. I think this is mere self-delusion, unfortunately. You can never be

Re: [HACKERS] Arbitary file size limit in twophase.c

2008-05-13 Thread Tom Lane
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes: > If we're going to check for file length, we should definitely check the > file length when we write it, so that we fail at PREPARE time, and not > at COMMIT time. I think this is mere self-delusion, unfortunately. You can never be certain at pr

Re: [HACKERS] Arbitary file size limit in twophase.c

2008-05-13 Thread Heikki Linnakangas
Tom Lane wrote: Gavin Sherry <[EMAIL PROTECTED]> writes: There's an apparently arbitary limit of 10,000,000 bytes in twophase.c on the size of a two phase commit file. I can't see why this limit exists. The comment seems perfectly clear about why the limit exists: * Check file length. W

Re: [HACKERS] Arbitary file size limit in twophase.c

2008-05-13 Thread Gavin Sherry
On Tue, May 13, 2008 at 10:34:23AM -0400, Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > There's an apparently arbitary limit of 10,000,000 bytes in twophase.c > > on the size of a two phase commit file. I can't see why this limit > > exists. > > The comment seems perfectly clear a

Re: [HACKERS] Arbitary file size limit in twophase.c

2008-05-13 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > There's an apparently arbitary limit of 10,000,000 bytes in twophase.c > on the size of a two phase commit file. I can't see why this limit > exists. The comment seems perfectly clear about why the limit exists: * Check file length. We can determin

[HACKERS] Arbitary file size limit in twophase.c

2008-05-13 Thread Gavin Sherry
There's an apparently arbitary limit of 10,000,000 bytes in twophase.c on the size of a two phase commit file. I can't see why this limit exists. I hit this limit by creating a prepared transaction which included dropping a schema with about 25,000 objects in it and then trying to commit it. The r