1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-25 20:23:07 +03:00

Sanitize the term "combo CID" in code comments

Combo CIDs were referred in the code comments using different terms
across various places of the code, so unify a bit the term used with
what is currently in use in some of the READMEs.

Author: "Hou, Zhijie"
Discussion: https://postgr.es/m/1d42865c91404f46af4562532fdbea31@G08CNEXMBPEKD05.g08.fujitsu.local
This commit is contained in:
Michael Paquier
2021-03-25 16:08:03 +09:00
parent 438fc4a39c
commit a1999a01bb
9 changed files with 55 additions and 55 deletions

View File

@@ -2157,7 +2157,7 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid,
int bufflags = 0;
/*
* If this is a catalog, we need to transmit combocids to properly
* If this is a catalog, we need to transmit combo CIDs to properly
* decode, so log that as well.
*/
if (RelationIsAccessibleInLogicalDecoding(relation))
@@ -2437,7 +2437,7 @@ heap_multi_insert(Relation relation, TupleTableSlot **slots, int ntuples,
RelationPutHeapTuple(relation, buffer, heaptuples[ndone], false);
/*
* For logical decoding we need combocids to properly decode the
* For logical decoding we need combo CIDs to properly decode the
* catalog.
*/
if (needwal && need_cids)
@@ -2453,7 +2453,7 @@ heap_multi_insert(Relation relation, TupleTableSlot **slots, int ntuples,
RelationPutHeapTuple(relation, buffer, heaptup, false);
/*
* For logical decoding we need combocids to properly decode the
* For logical decoding we need combo CIDs to properly decode the
* catalog.
*/
if (needwal && need_cids)
@@ -2733,7 +2733,7 @@ xmax_infomask_changed(uint16 new_infomask, uint16 old_infomask)
*
* In the failure cases, the routine fills *tmfd with the tuple's t_ctid,
* t_xmax (resolving a possible MultiXact, if necessary), and t_cmax (the last
* only for TM_SelfModified, since we cannot obtain cmax from a combocid
* only for TM_SelfModified, since we cannot obtain cmax from a combo CID
* generated by another transaction).
*/
TM_Result
@@ -2761,8 +2761,8 @@ heap_delete(Relation relation, ItemPointer tid,
Assert(ItemPointerIsValid(tid));
/*
* Forbid this during a parallel operation, lest it allocate a combocid.
* Other workers might need that combocid for visibility checks, and we
* Forbid this during a parallel operation, lest it allocate a combo CID.
* Other workers might need that combo CID for visibility checks, and we
* have no provision for broadcasting it to them.
*/
if (IsInParallelMode())
@@ -2963,7 +2963,7 @@ l1:
*/
CheckForSerializableConflictIn(relation, tid, BufferGetBlockNumber(buffer));
/* replace cid with a combo cid if necessary */
/* replace cid with a combo CID if necessary */
HeapTupleHeaderAdjustCmax(tp.t_data, &cid, &iscombo);
/*
@@ -3035,7 +3035,7 @@ l1:
xl_heap_header xlhdr;
XLogRecPtr recptr;
/* For logical decode we need combocids to properly decode the catalog */
/* For logical decode we need combo CIDs to properly decode the catalog */
if (RelationIsAccessibleInLogicalDecoding(relation))
log_heap_new_cid(relation, &tp);
@@ -3183,7 +3183,7 @@ simple_heap_delete(Relation relation, ItemPointer tid)
*
* In the failure cases, the routine fills *tmfd with the tuple's t_ctid,
* t_xmax (resolving a possible MultiXact, if necessary), and t_cmax (the last
* only for TM_SelfModified, since we cannot obtain cmax from a combocid
* only for TM_SelfModified, since we cannot obtain cmax from a combo CID
* generated by another transaction).
*/
TM_Result
@@ -3232,8 +3232,8 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
Assert(ItemPointerIsValid(otid));
/*
* Forbid this during a parallel operation, lest it allocate a combocid.
* Other workers might need that combocid for visibility checks, and we
* Forbid this during a parallel operation, lest it allocate a combo CID.
* Other workers might need that combo CID for visibility checks, and we
* have no provision for broadcasting it to them.
*/
if (IsInParallelMode())
@@ -3671,7 +3671,7 @@ l2:
HeapTupleHeaderSetXmax(newtup->t_data, xmax_new_tuple);
/*
* Replace cid with a combo cid if necessary. Note that we already put
* Replace cid with a combo CID if necessary. Note that we already put
* the plain cid into the new tuple.
*/
HeapTupleHeaderAdjustCmax(oldtup.t_data, &cid, &iscombo);
@@ -3987,7 +3987,7 @@ l2:
XLogRecPtr recptr;
/*
* For logical decoding we need combocids to properly decode the
* For logical decoding we need combo CIDs to properly decode the
* catalog.
*/
if (RelationIsAccessibleInLogicalDecoding(relation))
@@ -4259,7 +4259,7 @@ get_mxact_status_for_lock(LockTupleMode mode, bool is_update)
* In the failure cases other than TM_Invisible, the routine fills
* *tmfd with the tuple's t_ctid, t_xmax (resolving a possible MultiXact,
* if necessary), and t_cmax (the last only for TM_SelfModified,
* since we cannot obtain cmax from a combocid generated by another
* since we cannot obtain cmax from a combo CID generated by another
* transaction).
* See comments for struct TM_FailureData for additional info.
*
@@ -5901,7 +5901,7 @@ heap_abort_speculative(Relation relation, ItemPointer tid)
/*
* No need to check for serializable conflicts here. There is never a
* need for a combocid, either. No need to extract replica identity, or
* need for a combo CID, either. No need to extract replica identity, or
* do anything special with infomask bits.
*/
@@ -8345,7 +8345,7 @@ log_heap_new_cid(Relation relation, HeapTuple tup)
/*
* If the tuple got inserted & deleted in the same TX we definitely have a
* combocid, set cmin and cmax.
* combo CID, set cmin and cmax.
*/
if (hdr->t_infomask & HEAP_COMBOCID)
{
@@ -8355,7 +8355,7 @@ log_heap_new_cid(Relation relation, HeapTuple tup)
xlrec.cmax = HeapTupleHeaderGetCmax(hdr);
xlrec.combocid = HeapTupleHeaderGetRawCommandId(hdr);
}
/* No combocid, so only cmin or cmax can be set by this TX */
/* No combo CID, so only cmin or cmax can be set by this TX */
else
{
/*

View File

@@ -1608,7 +1608,7 @@ HeapTupleSatisfiesHistoricMVCC(HeapTuple htup, Snapshot snapshot,
/*
* another transaction might have (tried to) delete this tuple or
* cmin/cmax was stored in a combocid. So we need to lookup the actual
* cmin/cmax was stored in a combo CID. So we need to lookup the actual
* values externally.
*/
resolved = ResolveCminCmaxDuringDecoding(HistoricSnapshotGetTupleCids(), snapshot,
@@ -1616,21 +1616,21 @@ HeapTupleSatisfiesHistoricMVCC(HeapTuple htup, Snapshot snapshot,
&cmin, &cmax);
/*
* If we haven't resolved the combocid to cmin/cmax, that means we
* have not decoded the combocid yet. That means the cmin is
* If we haven't resolved the combo CID to cmin/cmax, that means we
* have not decoded the combo CID yet. That means the cmin is
* definitely in the future, and we're not supposed to see the tuple
* yet.
*
* XXX This only applies to decoding of in-progress transactions. In
* regular logical decoding we only execute this code at commit time,
* at which point we should have seen all relevant combocids. So
* at which point we should have seen all relevant combo CIDs. So
* ideally, we should error out in this case but in practice, this
* won't happen. If we are too worried about this then we can add an
* elog inside ResolveCminCmaxDuringDecoding.
*
* XXX For the streaming case, we can track the largest combocid
* XXX For the streaming case, we can track the largest combo CID
* assigned, and error out based on this (when unable to resolve
* combocid below that observed maximum value).
* combo CID below that observed maximum value).
*/
if (!resolved)
return false;
@@ -1704,21 +1704,21 @@ HeapTupleSatisfiesHistoricMVCC(HeapTuple htup, Snapshot snapshot,
&cmin, &cmax);
/*
* If we haven't resolved the combocid to cmin/cmax, that means we
* have not decoded the combocid yet. That means the cmax is
* If we haven't resolved the combo CID to cmin/cmax, that means we
* have not decoded the combo CID yet. That means the cmax is
* definitely in the future, and we're still supposed to see the
* tuple.
*
* XXX This only applies to decoding of in-progress transactions. In
* regular logical decoding we only execute this code at commit time,
* at which point we should have seen all relevant combocids. So
* at which point we should have seen all relevant combo CIDs. So
* ideally, we should error out in this case but in practice, this
* won't happen. If we are too worried about this then we can add an
* elog inside ResolveCminCmaxDuringDecoding.
*
* XXX For the streaming case, we can track the largest combocid
* XXX For the streaming case, we can track the largest combo CID
* assigned, and error out based on this (when unable to resolve
* combocid below that observed maximum value).
* combo CID below that observed maximum value).
*/
if (!resolved || cmax == InvalidCommandId)
return true;