Re: Adding new flags to XLogRecord

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding new flags to XLogRecord
Date: 2008-09-18 10:56:11
Message-ID: 48D233CB.80308@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:
> I'd like to add some new flag bits to XLogRecord. (xlog.h)
>
> Where? xl_prev.

I'm more curious about "What?" and "Why?", actually ;-),

> So I would like to propose that we ignore the top 4 bits in
> xl_prev.xlogid when comparing values, rather than using all 32 bits for
> comparison. That then frees up 4 new flag bits on XLogRecords. Changing
> xl_prev handling is only required in 3 places, all in xlog.c, plus some
> log outputs.

Or, we could store only the delta between current record and the
previous one. Assuming we know what the current record is, that wouldn't
lose any precision. That way xl_prev only needs to be as big as the
biggest possible WAL record we can have.

Not that I think the precision in your scheme isn't enough, but I find
the delta easier to comprehend.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-09-18 11:02:15 Re: [HACKERS] 0x1A in control file on Windows
Previous Message Simon Riggs 2008-09-18 10:20:51 Adding new flags to XLogRecord