Re: Hot standby, recovery procs

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hot standby, recovery procs
Date: 2009-02-24 18:59:30
Message-ID: 1235501970.16176.196.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-02-24 19:25:13 Re: Synchronous replication & Hot standby patches
Previous Message Andrew Dunstan 2009-02-24 18:53:23 Re: Synchronous replication & Hot standby patches