On Tue, 2009-02-24 at 10:40 +0200, Heikki Linnakangas wrote: > (back to reviewing the main hot standby patch at last) > > Why do we need recovery procs? AFAICS the only fields that we use are > xid and the subxid cache. Now that we also have the unobserved xids > array, why don't we use it to track all transactions in the master, not > just the unobserved ones.
We need an array of objects defined in shared memory that has a top-level xid and a subxid cache. That object also needs an lsn attribute. We need code that adds these, removes them and adds the data onto snapshots in almost identical ways to current procarray code. Those objects live and die completely differently to unobservedxids, which don't need (nor can they have) the more complex data structure. I think if I had not made those into procs you would have said that they are so similar it would aid code readability to have them be the same. What benefit would we gain from separating them, especially since we now have working, tested code? -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers