Re: WAL format

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WAL format
Date: 2009-12-07 20:48:23
Message-ID: 24297.1260218903@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Heikki Linnakangas wrote:
>> - at the end of WAL segment, when there's not enough space to write the
>> next WAL record, always write an XLOG SWITCH record to fill the rest of
>> the segment.

> What happens if a record is larger than a WAL segment? For example,
> what if I insert a 16 MB+ datum into a varlena field?

That case doesn't pose a problem --- the datum would be toasted into
individual tuples that are certainly no larger than a page. However
we do have cases where a WAL record can get arbitrarily large; in
particular a commit record with many subtransactions and/or many
disk files to delete. These cases do get exercised in the field
too --- I can recall at least one related bug report.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2009-12-07 20:53:48 Re: Install chapter broken link
Previous Message Andres Freund 2009-12-07 20:47:42 Re: WAL format