Doesn't WAL fail at BLCKSZ = 32k?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vadim Mikheev <vadim4o(at)email(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Doesn't WAL fail at BLCKSZ = 32k?
Date: 2001-02-28 18:36:17
Message-ID: 18895.983385377@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've been looking at the WAL code and trying to figure out what the
"backup block" mechanism is for. It appears that that can attach
up to two disk pages of info to a WAL log record. If there are any
cases where more than one page is really attached to a record, then
WAL will crash and burn with BLCKSZ = 32K, because the record length
field in XLogRecord is only 16 bits: there's not room for 2 * BLCKSZ,
let alone any additional fields.

The define
#define _INTL_MAXLOGRECSZ (3 * MAXLOGRECSZ)
in xlog.c is even more disturbing, if accurate; that'd mean that
BLCKSZ = 16k wouldn't work either.

I don't like the idea of restricting the maximum blocksize, since we
don't yet have a complete implementation of TOAST (cf indexes). This
appears to mean that the format of WAL records will have to change;
either we widen xl_len or arrange for backup blocks to be stored as
separate records. Or perhaps just agree that the backup blocks aren't
counted in xl_len, although that seems a tad klugy.

On the other hand, if there can't really be more than one backup block
per record, there's no issue. Where is this used, and for what?

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-02-28 20:13:40 Re: Release in 2 weeks ...
Previous Message Larry Rosenman 2001-02-28 17:26:59 Re: Re: int8 beta5 broken?