@@ -620,6 +620,7 @@ pathman_config_contains_relation(Oid relid, Datum *values, bool *isnull,
620620Snapshot snapshot ;
621621HeapTuple htup ;
622622bool contains_rel = false;
623+ TupleDesc tupleDescr ;
623624
624625ScanKeyInit (& key [0 ],
625626Anum_pathman_config_partrel ,
@@ -628,13 +629,15 @@ pathman_config_contains_relation(Oid relid, Datum *values, bool *isnull,
628629
629630/* Open PATHMAN_CONFIG with latest snapshot available */
630631rel = heap_open (get_pathman_config_relid (false),AccessShareLock );
632+ tupleDescr = RelationGetDescr (rel );
631633
632634/* Check that 'partrel' column is of regclass type */
633- Assert (TupleDescAttr (RelationGetDescr ( rel ) ,
635+ Assert (TupleDescAttr (tupleDescr ,
634636Anum_pathman_config_partrel - 1 )-> atttypid == REGCLASSOID );
635637
636638/* Check that number of columns == Natts_pathman_config */
637- Assert (RelationGetDescr (rel )-> natts == Natts_pathman_config );
639+ Assert (tupleDescr -> natts == Natts_pathman_config
640+ || tupleDescr -> natts == Natts_pathman_config_historic );
638641
639642snapshot = RegisterSnapshot (GetLatestSnapshot ());
640643scan = heap_beginscan (rel ,snapshot ,1 ,key );
@@ -647,7 +650,7 @@ pathman_config_contains_relation(Oid relid, Datum *values, bool *isnull,
647650if (values && isnull )
648651{
649652htup = heap_copytuple (htup );
650- heap_deform_tuple (htup ,RelationGetDescr ( rel ) ,values ,isnull );
653+ heap_deform_tuple (htup ,tupleDescr ,values ,isnull );
651654
652655/* Perform checks for non-NULL columns */
653656Assert (!isnull [Anum_pathman_config_partrel - 1 ]);