mirror of
https://github.com/postgres/postgres.git
synced 2025-11-29 23:43:17 +03:00
Remove all the special-case code for INT64_IS_BUSTED, per decision that
we're not going to support that anymore. I did keep the 64-bit-CRC-with-32-bit-arithmetic code, since it has a performance excuse to live. It's a bit moot since that's all ifdef'd out, of course.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* Author: Jan Wieck, Afilias USA INC.
|
||||
* 64-bit txids: Marko Kreen, Skype Technologies
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/txid.c,v 1.10 2010/01/02 16:57:55 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/txid.c,v 1.11 2010/01/07 04:53:34 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -30,13 +30,8 @@
|
||||
#include "utils/snapmgr.h"
|
||||
|
||||
|
||||
#ifndef INT64_IS_BUSTED
|
||||
/* txid will be signed int8 in database, so must limit to 63 bits */
|
||||
#define MAX_TXID UINT64CONST(0x7FFFFFFFFFFFFFFF)
|
||||
#else
|
||||
/* we only really have 32 bits to work with :-( */
|
||||
#define MAX_TXID UINT64CONST(0x7FFFFFFF)
|
||||
#endif
|
||||
|
||||
/* Use unsigned variant internally */
|
||||
typedef uint64 txid;
|
||||
@@ -97,7 +92,6 @@ load_xid_epoch(TxidEpoch *state)
|
||||
static txid
|
||||
convert_xid(TransactionId xid, const TxidEpoch *state)
|
||||
{
|
||||
#ifndef INT64_IS_BUSTED
|
||||
uint64 epoch;
|
||||
|
||||
/* return special xid's as-is */
|
||||
@@ -114,10 +108,6 @@ convert_xid(TransactionId xid, const TxidEpoch *state)
|
||||
epoch++;
|
||||
|
||||
return (epoch << 32) | xid;
|
||||
#else /* INT64_IS_BUSTED */
|
||||
/* we can't do anything with the epoch, so ignore it */
|
||||
return (txid) xid & MAX_TXID;
|
||||
#endif /* INT64_IS_BUSTED */
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user