"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 prepare time that a large alloc will succeed sometime later in a different process. Gavin's complaint is essentially that a randomly chosen hard limit is bad, and I agree with that. Choosing a larger hard limit doesn't make it less random. 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. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers