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

pgsql: Remove arbitrary 10MB limit on two-phase state file size.

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove arbitrary 10MB limit on two-phase state file size.
Date: 2008-05-19 18:16:26
Message-ID: 20080519181626.84637754C54@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/access/transam:
        twophase.c (r1.42 -> r1.43)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/twophase.c?r1=1.42&r2=1.43)

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2008-05-19 18:16:46
Subject: pgsql: Remove arbitrary 10MB limit on two-phase state file size.
Previous:From: Tom LaneDate: 2008-05-19 18:08:16
Subject: pgsql: Make to_char()'s localized month/day names depend on LC_TIME, not

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