Re: recovering from "found xmin ... from before relfrozenxid ..." - Mailing list pgsql-hackers

From Asim Praveen
Subject Re: recovering from "found xmin ... from before relfrozenxid ..."
Date
Msg-id 1D56CEFD-E195-4E6B-B870-3383E3E8C65E@vmware.com
Whole thread Raw
In response to Re: recovering from "found xmin ... from before relfrozenxid ..."  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Responses Re: recovering from "found xmin ... from before relfrozenxid ..."  (Ashutosh Sharma <ashu.coek88@gmail.com>)
List pgsql-hackers
Hi Ashutosh

I stumbled upon this thread today, went through your patch and it looks good.  A minor suggestion in
sanity_check_relation():

    if (rel->rd_rel->relam != HEAP_TABLE_AM_OID)
        ereport(ERROR,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                 errmsg("only heap AM is supported")));

Instead of checking the access method OID, it seems better to check the handler OID like so:

    if (rel->rd_amhandler != HEAP_TABLE_AM_HANDLER_OID)

The reason is current version of sanity_check_relation() would emit error for the following case even when the table
structureis actually heap.
 

    create access method myam type table handler heap_tableam_handler;
    create table mytable (…) using myam;

Asim

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: WIP: WAL prefetch (another approach)
Next
From: Julien Rouhaud
Date:
Subject: Re: [PG13] Planning (time + buffers) data structure in explain plan (format text)