postgres.git / summary / log / commit / refs

commit    b495c5685a1ac436a0006aba464efcf0edb6153d
Author:   Álvaro Herrera <alvherre@kurilemu.de>
Date:     Wed Aug 12 09:53:10 2026 +0000
First released in: 19.0

    Fix stale comments/signature after commit 28d534e2ae0a
    
    Commit db89a47115f0 added an 'options' argument to table_tuple_update()
    and table_tuple_delete(), correctly documenting it as recognizing no
    values.  It also (correctly) added pg_attribute_unused() to the
    corresponding heap_update() argument.  Commit 28d534e2ae0a then added
    TABLE_UPDATE_NO_LOGICAL and TABLE_DELETE_NO_LOGICAL, but failed to
    (correctly) update the comment and heap_update()'s signature.
    
    In table_tuple_update(), move the correct explanation of 'options' to
    the right place, remove the bogus one.
    
    In table_tuple_delete(), add the missing TABLE_DELETE_NO_LOGICAL doc.
    
    In heap_update(), remove the pg_attribute_unused() marker.
    
    Author: Nikhil Sontakke <nikhil@planetscale.com>
    Backpatch-through: 19
    Discussion: https://postgr.es/m/CA+UBoq21SzkjThYMSwSpVU-jwzpuEsf22Hq1FPbcKcDc43C29g@mail.gmail.com


src/backend/access/heap/heapam.c | 2 +- src/include/access/tableam.h | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 8b488cfd8f6..d0ffad19a16 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -3265,7 +3265,7 @@ simple_heap_delete(Relation relation, const ItemPointerData *tid) */ TM_Result heap_update(Relation relation, const ItemPointerData *otid, HeapTuple newtup, - CommandId cid, uint32 options pg_attribute_unused(), Snapshot crosscheck, bool wait, + CommandId cid, uint32 options, Snapshot crosscheck, bool wait, TM_FailureData *tmfd, LockTupleMode *lockmode, TU_UpdateIndexes *update_indexes) { diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h index f2c36696bca..ff03a2b816f 100644 --- a/src/include/access/tableam.h +++ b/src/include/access/tableam.h @@ -1531,6 +1531,10 @@ table_multi_insert(Relation rel, TupleTableSlot **slots, int nslots, * options - bitmask of options. Supported values: * TABLE_DELETE_CHANGING_PARTITION: the tuple is being moved to another * partition table due to an update of the partition key. + * TABLE_DELETE_NO_LOGICAL: force-disables the emitting of logical + * decoding information for the tuple. This should solely be used + * during table rewrites where RelationIsLogicallyLogged(rel) is not + * yet accurate for the new relation. * crosscheck - if not InvalidSnapshot, also check tuple against this * wait - true if should wait for any conflicting update to commit/abort * @@ -1566,12 +1570,12 @@ table_tuple_delete(Relation rel, ItemPointer tid, CommandId cid, * otid - TID of old tuple to be replaced * cid - update command ID (used for visibility test, and stored into * cmax/cmin if successful) - * options - bitmask of options. No values are currently recognized. + * options - bitmask of options. Supported values: + * TABLE_UPDATE_NO_LOGICAL: force-disables the emitting of logical + * decoding information for the tuple. This should solely be used + * during table rewrites where RelationIsLogicallyLogged(rel) is not + * yet accurate for the new relation. * crosscheck - if not InvalidSnapshot, also check old tuple against this - * options - These allow the caller to specify options that may change the - * behavior of the AM. The AM will ignore options that it does not support. - * TABLE_UPDATE_NO_LOGICAL -- force-disables the emitting of logical - * decoding information for the tuple. * * Output parameters: * slot - newly constructed tuple data to store [parent: d6bf0ab1704c]