Spurious set in heap_prune_chain() - Mailing list pgsql-hackers

From Jim Nasby
Subject Spurious set in heap_prune_chain()
Date
Msg-id 5446E35C.9060208@BlueTreble.com
Whole thread Raw
List pgsql-hackers
In heap_prune_chain():

    tup.t_tableOid = RelationGetRelid(relation);

    rootlp = PageGetItemId(dp, rootoffnum);

    /*
     * If it's a heap-only tuple, then it is not the start of a HOT chain.
     */
    if (ItemIdIsNormal(rootlp))
    {
        htup = (HeapTupleHeader) PageGetItem(dp, rootlp);

        tup.t_data = htup;
        tup.t_len = ItemIdGetLength(rootlp);
        tup.t_tableOid = RelationGetRelid(relation);

AFAICT the second case of setting tup.t_tableOid is pointless. Attached patch removes it. Passes make check.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Proposal: Log inability to lock pages during vacuum
Next
From: Jim Nasby
Date:
Subject: Re: Proposal: Log inability to lock pages during vacuum