Re: Transaction Snapshots and Hot Standby - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Transaction Snapshots and Hot Standby
Date
Msg-id 1222987379.4445.1629.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Transaction Snapshots and Hot Standby  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Thu, 2008-09-11 at 17:58 +0300, Heikki Linnakangas wrote:

> BTW, we haven't talked about how to acquire a snapshot in the slave. 
> You'll somehow need to know which transactions have not yet committed,
> but will in the future. In the master, we keep track of in-progress 
> transaction in the ProcArray, so I suppose we'll need to do the same
> in the slave. Very similar to prepared transactions, actually. I
> believe the Abort records, which are not actually needed for normal
> operation, become critical here. The slave will need to put an entry
> to ProcArray for any new XLogRecord.xl_xid it sees in the WAL, and
> remove the entry at a Commit and Abort record. And clear them all at a
> shutdown record.

Although I said differently earlier, it seems cleaner to make recovery
snapshots work by emulating ProcArray entries as you suggest. Fatal
errors were my problem there, but I think that's solvable now.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Block-level CRC checks
Next
From: Decibel!
Date:
Subject: Re: Block-level CRC checks