diff options
| author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-06-15 13:35:28 +0300 |
|---|---|---|
| committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-06-15 13:35:28 +0300 |
| commit | 264a6b127a918800d9f8bac80b5f4a8a8799d0f1 (patch) | |
| tree | 75825f27a40b019ed56ca6f806a3c5f497782e50 /src/include/storage/predicate_internals.h | |
| parent | 0a0e2b52a5a53b8747c165ff5c976f27df05a2e1 (diff) | |
| download | postgresql-264a6b127a918800d9f8bac80b5f4a8a8799d0f1.tar.gz | |
The rolled-back flag on serializable xacts was pointless and redundant with
the marked-for-death flag. It was only set for a fleeting moment while a
transaction was being cleaned up at rollback. All the places that checked
for the rolled-back flag should also check the marked-for-death flag, as
both flags mean that the transaction will roll back. I also renamed the
marked-for-death into "doomed", which is a lot shorter name.
Diffstat (limited to 'src/include/storage/predicate_internals.h')
| -rw-r--r-- | src/include/storage/predicate_internals.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/include/storage/predicate_internals.h b/src/include/storage/predicate_internals.h index da6e641f4e..b305c6a4c7 100644 --- a/src/include/storage/predicate_internals.h +++ b/src/include/storage/predicate_internals.h @@ -90,22 +90,21 @@ typedef struct SERIALIZABLEXACT int pid; /* pid of associated process */ } SERIALIZABLEXACT; -#define SXACT_FLAG_ROLLED_BACK 0x00000001 -#define SXACT_FLAG_COMMITTED 0x00000002 +#define SXACT_FLAG_COMMITTED 0x00000001 /* already committed */ +#define SXACT_FLAG_PREPARED 0x00000002 /* about to commit */ +#define SXACT_FLAG_DOOMED 0x00000004 /* will roll back */ /* * The following flag actually means that the flagged transaction has a * conflict out *to a transaction which committed ahead of it*. It's hard * to get that into a name of a reasonable length. */ -#define SXACT_FLAG_CONFLICT_OUT 0x00000004 -#define SXACT_FLAG_READ_ONLY 0x00000008 -#define SXACT_FLAG_MARKED_FOR_DEATH 0x00000010 +#define SXACT_FLAG_CONFLICT_OUT 0x00000008 +#define SXACT_FLAG_READ_ONLY 0x00000010 #define SXACT_FLAG_DEFERRABLE_WAITING 0x00000020 #define SXACT_FLAG_RO_SAFE 0x00000040 #define SXACT_FLAG_RO_UNSAFE 0x00000080 #define SXACT_FLAG_SUMMARY_CONFLICT_IN 0x00000100 #define SXACT_FLAG_SUMMARY_CONFLICT_OUT 0x00000200 -#define SXACT_FLAG_PREPARED 0x00000400 /* * The following types are used to provide an ad hoc list for holding |
