Remove unused PruneState member rel
authorHeikki Linnakangas <[email protected]>
Wed, 20 Mar 2024 08:13:42 +0000 (10:13 +0200)
committerHeikki Linnakangas <[email protected]>
Wed, 20 Mar 2024 08:13:42 +0000 (10:13 +0200)
PruneState->rel is no longer being used, so just remove it.

Author: Melanie Plageman <[email protected]>
Discussion: https://www.postgresql.org/message-id/20240320013602.6sypr4cx6sefpemg@liskov

src/backend/access/heap/pruneheap.c

index 15adfdc11b2e2aacd88e38b79bdabc874d3de494..69332b0d25ce188431a71c9304a59662f7054d4c 100644 (file)
@@ -29,8 +29,6 @@
 /* Working data for heap_page_prune and subroutines */
 typedef struct
 {
-   Relation    rel;
-
    /* tuple visibility test, initialized for the relation */
    GlobalVisState *vistest;
    /* whether or not dead items can be set LP_UNUSED during pruning */
@@ -235,7 +233,6 @@ heap_page_prune(Relation relation, Buffer buffer,
     * initialize the rest of our working state.
     */
    prstate.new_prune_xid = InvalidTransactionId;
-   prstate.rel = relation;
    prstate.vistest = vistest;
    prstate.mark_unused_now = mark_unused_now;
    prstate.snapshotConflictHorizon = InvalidTransactionId;
@@ -250,7 +247,7 @@ heap_page_prune(Relation relation, Buffer buffer,
    presult->nnewlpdead = 0;
 
    maxoff = PageGetMaxOffsetNumber(page);
-   tup.t_tableOid = RelationGetRelid(prstate.rel);
+   tup.t_tableOid = RelationGetRelid(relation);
 
    /*
     * Determine HTSV for all tuples.