Re: Hot standby, recovery procs - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Hot standby, recovery procs
Date
Msg-id 1235501970.16176.196.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Hot standby, recovery procs  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Hot standby, recovery procs
List pgsql-hackers
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.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Synchronous replication & Hot standby patches
Next
From: "Kevin Grittner"
Date:
Subject: Re: Synchronous replication & Hot standby patches