Re: Wal -long transaction - Mailing list pgsql-general

From Tom Lane
Subject Re: Wal -long transaction
Date
Msg-id 7333.1142263224@sss.pgh.pa.us
Whole thread Raw
In response to Re: Wal -long transaction  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Wal -long transaction  (Greg Stark <gsstark@mit.edu>)
List pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Mon, Mar 13, 2006 at 03:59:33PM +0100, Agnes Bocchino wrote:
>> (I have tried to make the test but without success for finding a long
>> transaction)

> AIUI it just keeps creating more segments. i.e. checkpoint_segment is
> not a hard limit. It's just the number it keeps around and recycles
> rather than continually creating and deleteing files.

More to the point, having a long transaction has nothing to do with this
(we are not Oracle!).  The only thing that determines the amount of WAL
space needed is the time between checkpoints.  You can have a
transaction that stays open for many checkpoints without causing WAL to
bloat.

Of course, there's no free lunch --- the price we pay for escaping
rollback-segment-overflow is table bloat if you don't vacuum often
enough.

            regards, tom lane

pgsql-general by date:

Previous
From: Niklas Johansson
Date:
Subject: Re: Problem getting plpgsql to choose the right query plan
Next
From: Tom Lane
Date:
Subject: Re: FATAL: terminating connection due to administrator command