1-byte id for SharedInvalidationMessages

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: 1-byte id for SharedInvalidationMessages
Date: 2010-08-10 01:54:15
Message-ID: AANLkTimbQzESc8a8T5Ce9T9=22uQ=Q8e6XUzWkARWire@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 6, 2010 at 2:43 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Do you think it's worth worrying about the reduction in the number of
>> possible SI message types?
>
> IIRC the number of message types is the number of catalog caches plus
> half a dozen or so.  We're a long way from exhausting even a 1-byte
> ID field; and we could play more games if we had to, since there would
> be a padding byte free in the message types that refer to a catalog
> cache.  IOW, 1-byte id doesn't bother me.

I took a look at what is required to implement $SUBJECT tonight and it
appears to be remarkably straightforward. I suppose this qualifies as
a reason to increment WAL_PAGE_MAGIC, since SharedInvalidationMessages
are now xlogged; and I added an Assert() to
AddCatCacheInvalidationMessage to detect overruns of the id field, but
other than that it seems to be just a matter of s/int16/int8/ in a
handful of places.

For those following along at home:

http://archives.postgresql.org/pgsql-hackers/2010-07/msg00355.php [the
patch for which this is a prerequisite]
http://archives.postgresql.org/pgsql-hackers/2010-08/msg00366.php [why
it needs it]
http://archives.postgresql.org/pgsql-hackers/2010-08/msg00425.php [how
this helps]

Thoughts?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

Attachment Content-Type Size
sinvalmsg-v1.patch application/octet-stream 3.2 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Oliveira 2010-08-10 02:46:14 Re: Universal B-tree
Previous Message Andrew Dunstan 2010-08-10 01:53:00 Re: TODO 9.0 done items removed