Skip site navigation (1) Skip section navigation (2)

Re: Transaction Snapshots and Hot Standby

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Transaction Snapshots and Hot Standby
Date: 2008-10-02 22:42:59
Message-ID: 1222987379.4445.1629.camel@ebony.2ndQuadrant (view raw or flat)
Thread:
Lists: 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.com
 PostgreSQL Training, Services and Support


In response to

pgsql-hackers by date

Next:From: Decibel!Date: 2008-10-02 22:56:16
Subject: Re: Block-level CRC checks
Previous:From: Gregory StarkDate: 2008-10-02 22:35:25
Subject: Re: Block-level CRC checks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group