ctas实现逻辑 > log_newpage C++ (gdb) _bt_blwritepage C++ (gdb) _bt_uppershutdown C++ (gdb) _bt_load C++ (gdb) _bt_leafbuild C++ (gdb) btbuild C++ (gdb) index_build C++ (gdb) index_create C++ (gdb) create_toast_table C++ (gdb) CheckAndCreateToastTable C++ (gdb) NewRelationCreateToastTable C++ (gdb) create_ctas_internal C++ (gdb) intorel_startup C++ (gdb) standard_ExecutorRun C++ (gdb) pgss_ExecutorRun C++ (gdb) ltsa_ExecutorRun C++ (gdb) pgsp_ExecutorRun C++ (gdb) ExecCreateTableAs C++ (gdb) ProcessUtilitySlow C++ (gdb) standard_ProcessUtility C++ (gdb) pgss_ProcessUtility C++ (gdb) ltsa_ProcessUtility C++ (gdb) pgaudit_ProcessUtility_hook C++ (gdb) pg_hint_plan_ProcessUtility C++ (gdb) LtStandbyProcessUtility C++ (gdb) pathman_process_utility_hook C++ (gdb) ProcessUtility C++ (gdb) PortalRunUtility C++ (gdb) PortalRunMulti C++ (gdb) PortalRun C++ (gdb) exec_simple_query C++ (gdb) PostgresMain C++ (gdb) BackendRun C++ (gdb) BackendStartup C++ (gdb) ServerLoop C++ (gdb) PostmasterMain C++ (gdb) main C++ (gdb) libc.so.6!raise libc.so.6!abort errfinish C++ (gdb) > XLogFileInit C++ (gdb) XLogWrite C++ (gdb) XLogFlush C++ (gdb) FlushBuffer C++ (gdb) BufferAlloc C++ (gdb) ReadBuffer_common C++ (gdb) ReadBufferExtended C++ (gdb) ReadBufferBI C++ (gdb) RelationGetBufferForTuple C++ (gdb) heap_insert C++ (gdb) heapam_tuple_insert C++ (gdb) table_tuple_insert C++ (gdb) intorel_receive C++ (gdb) ExecutePlan C++ (gdb) standard_ExecutorRun C++ (gdb) pgss_ExecutorRun C++ (gdb) ltsa_ExecutorRun C++ (gdb) pgsp_ExecutorRun C++ (gdb) ExecCreateTableAs C++ (gdb) ProcessUtilitySlow C++ (gdb) standard_ProcessUtility C++ (gdb) pgss_ProcessUtility C++ (gdb) ltsa_ProcessUtility C++ (gdb) pgaudit_ProcessUtility_hook C++ (gdb) pg_hint_plan_ProcessUtility C++ (gdb) LtStandbyProcessUtility C++ (gdb) pathman_process_utility_hook C++ (gdb) ProcessUtility C++ (gdb) PortalRunUtility C++ (gdb) PortalRunMulti C++ (gdb) PortalRun C++ (gdb) exec_simple_query C++ (gdb) PostgresMain C++ (gdb) BackendRun C++ (gdb) BackendStartup C++ (gdb) ServerLoop C++ (gdb) PostmasterMain C++ (gdb) main C++ (gdb) 2022-08-06 16:07:51.083299T @ postmaster 00000[2022-08-06 15:44:05 CST] 0 [165220] LOG: server process (PID 167657) was terminated by signal 6: Aborted 2022-08-06 16:07:51.083299T @ postmaster 00000[2022-08-06 15:44:05 CST] 0 [165220] DETAIL: Failed process was running: create table big_table as select i, 'fewwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww' || i from generate_series(1,10000000) i; 2022-08-06 16:07:51.083339T @ postmaster 00000[2022-08-06 15:44:05 CST] 0 [165220] LOG: terminating any other active server processes 2022-08-06 16:07:51.083458T @ autovacuum launcher 57P02[2022-08-06 15:44:05 CST] 0 [165229] WARNING: terminating connection because of crash of another server process 2022-08-06 16:07:51.083458T @ autovacuum launcher 57P02[2022-08-06 15:44:05 CST] 0 [165229] DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 2022-08-06 16:07:51.083458T @ autovacuum launcher 57P02[2022-08-06 15:44:05 CST] 0 [165229] HINT: In a moment you should be able to reconnect to the database and repeat your command. 2022-08-06 16:07:51.084508T [unknown] zjh@postgres [local] client backend 57P03[2022-08-06 16:07:51 CST] 0 [9389] FATAL: the database system is in recovery mode 2022-08-06 16:07:51.085146T @ postmaster 00000[2022-08-06 15:44:05 CST] 0 [165220] LOG: all server processes terminated; reinitializing 2022-08-06 16:07:51.172925T @ startup 00000[2022-08-06 16:07:51 CST] 0 [9391] LOG: database system was interrupted; last known up at 2022-08-06 15:44:05 CST 2022-08-06 16:07:51.184637T @ startup 00000[2022-08-06 16:07:51 CST] 0 [9391] LOG: database system was not properly shut down; automatic recovery in progress 2022-08-06 16:07:51.185106T @ startup 00000[2022-08-06 16:07:51 CST] 0 [9391] LOG: redo starts at 0/209C9FA0 2022-08-06 16:07:54.077694T @ startup 00000[2022-08-06 16:07:51 CST] 0 [9391] LOG: redo done at 0/3FFFFF68 2022-08-06 16:07:54.078338T @ startup 00000[2022-08-06 16:07:51 CST] 0 [9391] LOG: checkpoint starting: end-of-recovery immediate 2022-08-06 16:07:55.524716T @ startup 53100[2022-08-06 16:07:51 CST] 0 [9391] PANIC: could not write to file "lt_wal/xlogtemp.9391": No space left on device 2022-08-06 16:07:55.526168T @ postmaster 00000[2022-08-06 15:44:05 CST] 0 [165220] LOG: startup process (PID 9391) was terminated by signal 6: Aborted 2022-08-06 16:07:55.526177T @ postmaster 00000[2022-08-06 15:44:05 CST] 0 [165220] LOG: aborting startup due to startup process failure 2022-08-06 16:07:55.526615T @ postmaster 00000[2022-08-06 15:44:05 CST] 0 [165220] LOG: database system is shut down
看起来是ctas语句导致了lightdb进程宕机,实际并非如此。业务进程并不会导致lightdb主进程退出,是后台进程写文件失败导致的进程异常退出。lightdb 22.3(已发布)已通过隔离方式实现空间满不会导致主进程宕机。