postgresql/src
Heikki Linnakangas 9402869160 Advance backend's advertised xmin more aggressively.
Currently, a backend will reset it's PGXACT->xmin value when it doesn't
have any registered snapshots left. That covered the common case that a
transaction in read committed mode runs several queries, one after each
other, as there would be no snapshots active between those queries.
However, if you hold cursors across each of the query, we didn't get a
chance to reset xmin.

To make that better, keep all the registered snapshots in a pairing heap,
ordered by xmin so that it's always quick to find the snapshot with the
smallest xmin. That allows us to advance PGXACT->xmin whenever the oldest
snapshot is deregistered, even if there are others still active.

Per discussion originally started by Jeff Davis back in 2009 and more
recently by Robert Haas.
2015-01-17 01:15:23 +02:00
..
backend Advance backend's advertised xmin more aggressively. 2015-01-17 01:15:23 +02:00
bin Fix portability breakage in pg_dump. 2015-01-11 13:28:26 -05:00
common Fix libpq's behavior when /etc/passwd isn't readable. 2015-01-11 12:35:44 -05:00
include Advance backend's advertised xmin more aggressively. 2015-01-17 01:15:23 +02:00
interfaces Fix libpq's behavior when /etc/passwd isn't readable. 2015-01-11 12:35:44 -05:00
makefiles Revert haphazard pgxs makefile changes 2014-12-04 08:07:59 -05:00
pl Fix some functions that were declared static then defined not-static. 2015-01-12 16:08:43 -05:00
port Another attempt at fixing Windows Norwegian locale. 2015-01-16 13:28:19 +02:00
template Remove duplicate specification of -Ae for HP-UX C compiler. 2015-01-13 22:52:11 -05:00
test Update "pg_regress --no-locale" for Darwin and Windows. 2015-01-16 01:27:31 -05:00
timezone Update copyright for 2015 2015-01-06 11:43:47 -05:00
tools Document that Perl's Tie might add a trailing newline 2015-01-06 15:52:15 -05:00
tutorial Update copyright for 2015 2015-01-06 11:43:47 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Fix installcheck case for tap tests 2014-12-24 10:31:36 -05:00
Makefile.shlib Clarify .def file comments. 2014-11-02 21:43:33 -05:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00