latestCompletedXid - Mailing list pgsql-hackers

From Simon Riggs
Subject latestCompletedXid
Date
Msg-id 1223632313.7007.140.camel@ebony.2ndQuadrant
Whole thread Raw
Responses Re: latestCompletedXid
List pgsql-hackers
Currently, we advance latestCompletedXid during
ProcArrayEndTransaction() for both commits and aborts.

If a transaction aborts, its effects are invisible to us just the same
as if the transaction is still running.

ISTM that we need not move latestCompletedXid as a result of an abort.
Only a commit could change what we see as visible.

This must be true, because if a backend had a FATAL error but yet exited
before it ran ProcArrayEndTransaction() we would not move
latestCompletedXid forward either.

Avoiding this will make snapshots smaller in some cases, but it's really
just a correctness thing.

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



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: LWLockAcquire with priority
Next
From: "Kevin Grittner"
Date:
Subject: Re: 8.4devel out of memory