On Mon, May 9, 2011 at 12:51 PM, Alvaro Herrera <alvhe...@commandprompt.com> wrote: > Excerpts from Robert Haas's message of vie may 06 23:25:09 -0300 2011: >> On Fri, Apr 22, 2011 at 4:13 AM, Leonardo Francalanci <m_li...@yahoo.it> >> wrote: >> >> Maybe you should change xl_act_commit to have a separate list of rels to >> >> drop the init fork for (instead of mixing those with the list of files to >> >> drop as a whole). >> > >> > I tried to follow your suggestion, thank you very much. >> >> I have to admit I don't like this approach very much. I can't see >> adding 4 bytes to every commit record for this feature. > > Hmm, yeah. Maybe we can add a "flags" int8 somewhere in that struct and > set a bit in it if nrels, nsubxacts, nmsgs and respective arrays are present. > That would save some int's that are already in there.
Yes, that seems like a very appealing approach. There is plenty of bit-space available in xinfo, and we could reserve a bit each for nrels, nsubxacts, and nmsgs, with set meaning that an integer count of that item is present and clear meaning that the count is omitted from the structure (and zero). This will probably require a bit of tricky code reorganization so I think it should be done separately from the main patch. With that done, then it's not a big deal for the main patch to add in one more array that will normally get omitted. And in the process, we can save 12 bytes on every commit record in the common case, which is quite appealing: I don't expect a huge performance gain, but a penny saved is a penny earned. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers