]> granicus.if.org Git - postgresql/commit
Remove arbitrary 10MB limit on two-phase state file size. It's not that hard
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 19 May 2008 18:16:26 +0000 (18:16 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 19 May 2008 18:16:26 +0000 (18:16 +0000)
commit50ff07d5b130b9e8fa2d71e3ab83329efd94bdb7
treecb41a510c018ac5ced5b91633a5502efd2d8d742
parent07a560673515e6de19010d89549cefdf7544bd63
Remove arbitrary 10MB limit on two-phase state file size. It's not that hard
to go beoynd 10MB, as demonstrated by Gavin Sharry's example of dropping a
schema with ~25000 objects. The really bogus thing about the limit was that
it was enforced when a state file file was read in, not when it was written,
so you would end up with a prepared transaction that you can't commit or
abort, and the only recourse was to shut down the server and remove the file
by hand.

Raise the limit to MaxAllocSize, and enforce it also when a state file is
written. We could've removed the limit altogether, but reading in a file
larger than MaxAllocSize would fail anyway because we read it into a
palloc'd buffer.

Backpatch down to 8.1, where 2PC and this issue was introduced.
src/backend/access/transam/twophase.c