diff options
Diffstat (limited to 'src/backend/commands/sequence.c')
-rw-r--r-- | src/backend/commands/sequence.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 1f2546d69ca..de41c8a1c71 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -14,8 +14,9 @@ */ #include "postgres.h" -#include "access/transam.h" #include "access/htup_details.h" +#include "access/multixact.h" +#include "access/transam.h" #include "access/xlogutils.h" #include "catalog/dependency.h" #include "catalog/namespace.h" @@ -282,8 +283,10 @@ ResetSequence(Oid seq_relid) /* * Create a new storage file for the sequence. We want to keep the * sequence's relfrozenxid at 0, since it won't contain any unfrozen XIDs. + * Same with relminmxid, since a sequence will never contain multixacts. */ - RelationSetNewRelfilenode(seq_rel, InvalidTransactionId); + RelationSetNewRelfilenode(seq_rel, InvalidTransactionId, + InvalidMultiXactId); /* * Insert the modified tuple into the new storage file. @@ -1110,7 +1113,8 @@ read_seq_tuple(SeqTable elm, Relation rel, Buffer *buf, HeapTuple seqtuple) * bit update, ie, don't bother to WAL-log it, since we can certainly do * this again if the update gets lost. */ - if (HeapTupleHeaderGetXmax(seqtuple->t_data) != InvalidTransactionId) + Assert(!(seqtuple->t_data->t_infomask & HEAP_XMAX_IS_MULTI)); + if (HeapTupleHeaderGetRawXmax(seqtuple->t_data) != InvalidTransactionId) { HeapTupleHeaderSetXmax(seqtuple->t_data, InvalidTransactionId); seqtuple->t_data->t_infomask &= ~HEAP_XMAX_COMMITTED; |