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

From Zeugswetter Andreas OSB sIT
Subject Re: Transaction Snapshots and Hot Standby
Date
Msg-id 6DAFE8F5425AB84DB3FCA4537D829A561CE05C7235@M0164.s-mxs.net
Whole thread Raw
In response to Re: Transaction Snapshots and Hot Standby  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Transaction Snapshots and Hot Standby  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
> > I wonder whether the cancel can be delayed until a tuple/page is actually accessed
> > that shows a too new xid.
>
> Yes, its feasible and is now part of the design.
>
> This is all about what happens *if* we need to remove rows that a query
> can still see.

I was describing a procedure for exactly that case.

If a slave backend has a snapshot that we cannot guarantee any more
(because max_slave_delay has been exceeded):

> > Instead of cancel, the backend gets a message with a lsn_horizon.
> > From there on, whenever the backend reads a page/tuple with a LSN > lsn_horizon it cancels.

but not before (at the time max_slave_delay has been reached), as described earlier.

Andreas


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: PostgreSQL future ideas
Next
From: "Robert Haas"
Date:
Subject: Re: Proposal of SE-PostgreSQL patches (for CommitFest:Sep)