pg_dump has the option "--no-table-access-method". Should that somehow
interact with this feature? As currently that can result in non
restorable dumps.
There's also one more limitation similar to the TEXT issue I reported
upthread - and similarly it's not an issue for current tests, but
might be worth improving:
/* src: src/backend/access/heap/heapam.c:1449-1452 */
if (unlikely(sscan->rs_rd->rd_tableam != GetHeapamTableAmRoutine()))
ereport(ERROR, ... errmsg_internal("only heap AM is supported")));
CREATE TABLE ti (a int) USING dummy_table_am;
CREATE INDEX ON ti(a); -- ERROR:
only heap AM is supported
CREATE TABLE tp (a int PRIMARY KEY) USING dummy_table_am; -- ERROR:
only heap AM is supported