mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user