|From:||Simon Riggs <simon(at)2ndQuadrant(dot)com>|
|To:||Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>|
|Subject:||Re: Transaction Snapshots and Hot Standby|
|Views:||Raw Message | Whole Thread | Download mbox|
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.com
PostgreSQL Training, Services and Support
|Next Message||Decibel!||2008-10-02 22:56:16||Re: Block-level CRC checks|
|Previous Message||Gregory Stark||2008-10-02 22:35:25||Re: Block-level CRC checks|