postgresql/src
Heikki Linnakangas cb2d158c58 Fix locking while setting flags in MySerializableXact.
Even if a flag is modified only by the backend owning the transaction, it's
not safe to modify it without a lock. Another backend might be setting or
clearing a different flag in the flags field concurrently, and that
operation might be lost because setting or clearing a bit in a word is not
atomic.

Make did-write flag a simple backend-private boolean variable, because it
was only set or tested in the owning backend (except when committing a
prepared transaction, but it's not worthwhile to optimize for the case of a
read-only prepared transaction). This also eliminates the need to add
locking where that flag is set.

Also, set the did-write flag when doing DDL operations like DROP TABLE or
TRUNCATE -- that was missed earlier.
2011-06-10 23:41:10 +03:00
..
backend Fix locking while setting flags in MySerializableXact. 2011-06-10 23:41:10 +03:00
bin Translation updates for 9.1beta2 2011-06-09 23:02:48 +03:00
include Fix locking while setting flags in MySerializableXact. 2011-06-10 23:41:10 +03:00
interfaces Translation updates for 9.1beta2 2011-06-09 23:02:48 +03:00
makefiles Rewrite installation makefile rules without for loops 2011-05-02 01:05:08 +03:00
pl Translation updates for 9.1beta2 2011-06-09 23:02:48 +03:00
port Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
template
test Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
timezone Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
tools Add comment about pg_ctl stop 2011-06-10 15:27:38 -04:00
tutorial
.gitignore
bcc32.mak
DEVELOPERS
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
nls-global.mk
win32.mak