Re: Adding new flags to XLogRecord - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Adding new flags to XLogRecord
Date
Msg-id 48D233CB.80308@enterprisedb.com
Whole thread Raw
In response to Adding new flags to XLogRecord  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Adding new flags to XLogRecord  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Adding new flags to XLogRecord  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Adding new flags to XLogRecord
Next
From: Heikki Linnakangas
Date:
Subject: Re: [BUGS] 0x1A in control file on Windows