Re: Hard limit on WAL space used (because PANIC sucks) - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Hard limit on WAL space used (because PANIC sucks)
Date
Msg-id CA+U5nM+8-DuUTFgtk=SfeHGc6_OMfc++muDcskiSf7GR+YLrJA@mail.gmail.com
Whole thread Raw
In response to Re: Hard limit on WAL space used (because PANIC sucks)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 22 January 2014 01:23, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
>> On 2014-01-21 18:59:13 -0500, Tom Lane wrote:
>>> Another thing to think about is whether we couldn't put a hard limit on
>>> WAL record size somehow.  Multi-megabyte WAL records are an abuse of the
>>> design anyway, when you get right down to it.  So for example maybe we
>>> could split up commit records, with most of the bulky information dumped
>>> into separate records that appear before the "real commit".  This would
>>> complicate replay --- in particular, if we abort the transaction after
>>> writing a few such records, how does the replayer realize that it can
>>> forget about those records?  But that sounds probably surmountable.
>
>> I think removing the list of subtransactions from commit records would
>> essentially require not truncating pg_subtrans after a restart
>> anymore.
>
> I'm not suggesting that we stop providing that information!  I'm just
> saying that we perhaps don't need to store it all in one WAL record,
> if instead we put the onus on WAL replay to be able to reconstruct what
> it needs from a series of WAL records.

I think removing excess subxacts from commit and abort records could
be a good idea. Not sure anybody considered it before.

We already emit xid allocation records when we overflow, so we already
know which subxids have been allocated. We also issue subxact abort
records for anything that aborted. So in theory we should be able to
reconstruct an arbitrarily long chain of subxacts.

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Yugo Nagata
Date:
Subject: Re: Proposal: variant of regclass
Next
From: Simon Riggs
Date:
Subject: Re: Hard limit on WAL space used (because PANIC sucks)