postgresql/src
Tom Lane d2088ae949 Move RegisterPredicateLockingXid() call to a safer place.
The SSI patch inserted a call of RegisterPredicateLockingXid into
GetNewTransactionId, which was a bad idea on a couple of grounds.  First,
it's not necessary to hold XidGenLock while manipulating that shared
memory, and doing so is bad because XidGenLock is a high-contention lock
that should be held for as short a time as possible.  (Not to mention that
it adds an entirely unnecessary deadlock hazard, since we must take
SerializableXactHashLock as well.)  Second, the specific place where it was
put was between extending CLOG and advancing nextXid, which could result in
unpleasant behavior in case of a failure there.  Pull the call out to
AssignTransactionId, which is much safer and arguably better from a
modularity standpoint too.

There is more work to do to clean up the failure-before-advancing-nextXid
issue, but that is a separate change that will need to be back-patched.
So for the moment I just want to make GetNewTransactionId look the same as
it did in prior versions.
2011-05-06 12:57:28 -04:00
..
backend Move RegisterPredicateLockingXid() call to a safer place. 2011-05-06 12:57:28 -04:00
bin Remove redundant port number check 2011-05-04 21:02:02 +03:00
include Use a macro variable PG_PRINTF_ATTRIBUTE for the style used for checking printf type functions. 2011-04-28 10:56:14 -04:00
interfaces Use non-literal format for possibly non-standard strftime formats. 2011-04-28 19:58:49 -04:00
makefiles Rewrite installation makefile rules without for loops 2011-05-02 01:05:08 +03:00
pl Catch errors in for loop in makefile 2011-05-02 01:05:08 +03:00
port Assorted minor changes to silence Windows compiler warnings. 2011-04-25 12:56:53 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Unbreak the regression tests from my previous commit 2011-05-05 23:02:03 +02:00
timezone Assorted minor changes to silence Windows compiler warnings. 2011-04-25 12:56:53 -04:00
tools Adjust yywrap macro for non-reentrant scanners for MSVC. 2011-04-25 09:10:59 -04:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -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 Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Rename pg_regress option --multibyte to --encoding 2011-04-15 08:42:05 +03:00
Makefile.shlib Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00