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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to