diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 039c0d3eef4..e9780e7237f 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -466,14 +466,15 @@ RelationParseRelOptions(Relation relation, HeapTuple tuple) bytea *options; amoptions_function amoptsfn; const TableAmRoutine *tableam = NULL; - + Form_pg_class classForm = (Form_pg_class) GETSTRUCT(tuple); +; relation->rd_options = NULL; /* * Look up any AM-specific parse function; fall out if relkind should not * have options. */ - switch (relation->rd_rel->relkind) + switch (classForm->relkind) { case RELKIND_RELATION: case RELKIND_TOASTVALUE: