(gdb) bt full #0 0x00007fff884caf8a in __semwait_signal () No symbol table info available. #1 0x00007fff884cae19 in nanosleep () No symbol table info available. #2 0x00007fff88517df0 in sleep () No symbol table info available. #3 0x00000001002f9d77 in ExceptionalCondition (conditionName=, errorType=, fileName=, lineNumber=) at assert.c:54 No locals. #4 0x00000001002ed3bf in RelationDestroyRelation (relation=0x100faae20) at relcache.c:1756 No locals. #5 0x00000001002f1d58 in RelationClearRelation (relation=0x100faae20, rebuild=) at relcache.c:1930 newrel = (Relation) 0x0 save_relid = 41137 keep_tupdesc = #6 0x00000001002f22a2 in RelationCacheInvalidateEntry (relationId=41137) at relcache.c:2027 relation = (Relation) #7 0x00000001002e9bf6 in LocalExecuteInvalidationMessage (msg=0x10114b660) at inval.c:501 i = #8 0x00000001002e93df in ProcessInvalidationMessages (hdr=0x10114ae48, func=0x1002e9ab0 ) at inval.c:391 _cindex = _chunk = (InvalidationChunk *) 0x10114b650 #9 0x00000001002e9480 in CommandEndInvalidationMessages () at inval.c:1047 No locals. #10 0x0000000100124294 in ATRewriteCatalogs [inlined] () at /Users/rhaas/pgsql/src/backend/commands/tablecmds.c:3022 rel = (Relation) 0x100faae20 lcmd = (ListCell *) 0x101175858 pass = 8 ltab = (ListCell *) 0x10118ea90 lockmode = #11 0x0000000100124294 in ATController (rel=, cmds=, recurse=, lockmode=4) at tablecmds.c:2756 rel = (Relation) 0x100faae20 lcmd = (ListCell *) 0x101175858 pass = 8 ltab = (ListCell *) 0x10118ea90 lockmode = #12 0x000000010023b185 in standard_ProcessUtility (parsetree=0x101041a40, queryString=0x101040e38 "ALTER TABLE tt0 OF tt_t0;", params=0x0, isTopLevel=1 '\001', dest=0x101041dc8, completionTag=) at utility.c:781 stmt = stmts = l = (ListCell *) 0x10118e850 validnsps = {0x100389abe "toast", 0x0} #13 0x000000010023628b in MemoryContextSwitchTo [inlined] () at /Users/rhaas/pgsql/src/include/utils/palloc.h:1184 No locals. #14 0x000000010023628b in PortalRunUtility (portal=0x1010f5a38, utilityStmt=0x101041a40, isTopLevel=, dest=0x101041dc8, completionTag=0x7fff5fbfdd30 "") at pquery.c:1192 context = (MemoryContext) #15 0x0000000100237a45 in PortalRunMulti (portal=0x1010f5a38, isTopLevel=, dest=0x101041dc8, altdest=0x101041dc8, completionTag=0x7fff5fbfdd30 "") at pquery.c:1315 stmt = (Node *) 0x101041a40 active_snapshot_set = 0 '\0' stmtlist_item = (ListCell *) 0x101041d68 #16 0x00000001002383e8 in PortalRun (portal=0x1010f5a38, count=9223372036854775807, isTopLevel=, dest=0x101041dc8, altdest=0x101041dc8, completionTag=0x7fff5fbfdd30 "") at pquery.c:813 save_exception_stack = (sigjmp_buf *) 0x7fff5fbfde60 save_context_stack = (ErrorContextCallback *) 0x0 local_sigjmp_buf = {17046984, 1, 1606409424, 32767, 1606409136, 32767, 17783352, 1, 17046080, 1, 3552322, 1, 17046136, 1, 2326934, 1, 530, 0, 8096, 895, 17026896, 0, 17046080, 1, 3552322, 1, 17046136, 1, 1606409392, 32767, 3264283, 1, 2, 0, 17783352, 1, 1606409424, 32767} saveTopTransactionResourceOwner = (ResourceOwner) 0x101146b90 saveTopTransactionContext = (MemoryContext) 0x10106e858 saveActivePortal = (Portal) 0x0 saveResourceOwner = (ResourceOwner) 0x101146b90 savePortalContext = (MemoryContext) 0x0 saveMemoryContext = (MemoryContext) 0x10106e858 #17 0x000000010023437d in exec_simple_query (query_string=0x101040e38 "ALTER TABLE tt0 OF tt_t0;") at postgres.c:1018 parsetree = (Node *) 0x101041a40 portal = (Portal) 0x1010f5a38 commandTag = 0x100363442 "ALTER TABLE" completionTag = "\000ݿ_?\000\000J?0\000\001\000\000\000\002\000\000\000\000\000\000\000 ߿\000\006\000\000\000x?\003\001\001\000\000\000\006\000\000\000\000\000\000\000?AQ\000\001\000\000\000\002\000\000\000\000\000\000" querytree_list = plantree_list = receiver = (DestReceiver *) 0x101041dc8 format = 0 dest = DestRemote oldcontext = (MemoryContext) 0x10106e858 parsetree_list = (List *) 0x101041aa0 parsetree_item = (ListCell *) 0x101041a78 save_log_statement_stats = 0 '\0' was_logged = 0 '\0' msec_str = "\031\000\000\000\000\000\000\0008\016\004\001\001\000\000\000?ݿ_?\000\000|?0\000\001\000\000" #18 0x0000000100234f31 in PostgresMain (argc=2, argv=, username=) at postgres.c:3919 query_string = 0x101040e38 "ALTER TABLE tt0 OF tt_t0;" dbname = firstchar = 81 stack_base = 0 '\0' input_message = { data = 0x101040e38 "ALTER TABLE tt0 OF tt_t0;", len = 26, maxlen = 1024, cursor = 26 } local_sigjmp_buf = {1606409984, 32767, 1606410208, 32767, 1606409696, 32767, 11575168, 1, 2, 0, 17028800, 1, 17029496, 1, 2312734, 1, 530, 0, 8096, 895, 0, 1, 4, 0, 1606410128, 32767, -455871145, -1979638038, 0, 0, 1606410160, 32767, 1606410032, 32767, 17028800, 1, 17028832, 1} send_ready_for_query = 0 '\0' #19 0x00000001001e818c in ServerLoop () at postmaster.c:3590 port = (Port *) #20 0x00000001001e90f1 in PostmasterMain (argc=6, argv=0x100b08f30) at postmaster.c:1110 opt = status = userDoption = 0x100b08fe0 "/Users/rhaas/pgsql/src/test/regress/./tmp_check/data" listen_addr_saved = 0 '\0' #21 0x000000010017c485 in main (argc=6, argv=0x100b08f30) at main.c:199 No locals. (gdb) fr 4 #4 0x00000001002ed3bf in RelationDestroyRelation (relation=0x100faae20) at relcache.c:1756 1756 Assert(RelationHasReferenceCountZero(relation)); (gdb) p *relation $1 = { rd_node = { spcNode = 1663, dbNode = 16384, relNode = 41137 }, rd_smgr = 0x0, rd_refcnt = 1, rd_backend = -1, rd_isnailed = 0 '\0', rd_isvalid = 0 '\0', rd_indexvalid = 0 '\0', rd_createSubid = 0, rd_newRelfilenodeSubid = 0, rd_rel = 0x100e1b590, rd_att = 0x100fc0090, rd_id = 41137, rd_indexlist = 0x0, rd_indexattr = 0x0, rd_oidindex = 0, rd_lockInfo = { lockRelId = { relId = 41137, dbId = 16384 } }, rd_rules = 0x0, rd_rulescxt = 0x0, trigdesc = 0x0, rd_options = 0x0, rd_index = 0x0, rd_indextuple = 0x0, rd_am = 0x0, rd_indexcxt = 0x0, rd_aminfo = 0x0, rd_opfamily = 0x0, rd_opcintype = 0x0, rd_support = 0x0, rd_supportinfo = 0x0, rd_indoption = 0x0, rd_indexprs = 0x0, rd_indpred = 0x0, rd_exclops = 0x0, rd_exclprocs = 0x0, rd_exclstrats = 0x0, rd_amcache = 0x0, rd_indcollation = 0x0, rd_toastoid = 0, pgstat_info = 0x101158e78 } (gdb) p *relation->rd_rel $2 = { relname = { data = "tt0", '\0' }, relnamespace = 2200, reltype = 41139, reloftype = 0, relowner = 10, relam = 0, relfilenode = 41137, reltablespace = 0, relpages = 0, reltuples = 0, reltoastrelid = 0, reltoastidxid = 0, relhasindex = 0 '\0', relisshared = 0 '\0', relpersistence = 112 'p', relkind = 114 'r', relnatts = 2, relchecks = 0, relhasoids = 0 '\0', relhaspkey = 0 '\0', relhasrules = 0 '\0', relhastriggers = 0 '\0', relhassubclass = 1 '\001', relfrozenxid = 5822, relacl = {17222296}, reloptions = {{ vl_len_ = "\001\000\000", vl_dat = "" }} } (gdb) q The program is running. Quit anyway (and detach it)? (y or n) y