postgresql copy from实现
[lightdb@hs-10-20-30-199 ~]$ pstack 242677 #0 0x00007eff9d4585de in get_next_seq () from /lib64/libc.so.6 #1 0x00007eff9d4597a9 in strcoll_l () from /lib64/libc.so.6 #2 0x000000000087de6b in varstr_cmp (arg1=0x2aae06ff8271 "F62201648610", len1=12, arg2=0x229ffd1 "F62201642947", len2=<optimized out>, collid=<optimized out>) at varlena.c:1723 #3 0x000000000087e6f3 in bttextcmp (fcinfo=0x7ffe3b67f750) at varlena.c:1977 #4 0x00000000008aa9ca in FunctionCall2Coll (flinfo=flinfo@entry=0x229e410, collation=<optimized out>, arg1=<optimized out>, arg2=<optimized out>) at fmgr.c:1164 #5 0x00000000004e6306 in _bt_compare (rel=rel@entry=0x7eff9eef7c28, key=key@entry=0x229e3e8, page=page@entry=0x2aae06ff6a00 "\350\030", offnum=offnum@entry=93) at nbtsearch.c:725 #6 0x00000000004e6614 in _bt_binsrch (rel=rel@entry=0x7eff9eef7c28, key=key@entry=0x229e3e8, buf=<optimized out>) at nbtsearch.c:401 #7 0x00000000004e6914 in _bt_search (rel=rel@entry=0x7eff9eef7c28, key=0x229e3e8, bufP=bufP@entry=0x7ffe3b67f9a8, access=access@entry=2, snapshot=snapshot@entry=0x0) at nbtsearch.c:150 #8 0x00000000004dfdc8 in _bt_search_insert (insertstate=0x7ffe3b67f990, rel=0x7eff9eef7c28) at nbtinsert.c:359 #9 _bt_doinsert (rel=rel@entry=0x7eff9eef7c28, itup=itup@entry=0x229ffc8, checkUnique=checkUnique@entry=UNIQUE_CHECK_NO, heapRel=heapRel@entry=0x7eff9eee6e08) at nbtinsert.c:146 #10 0x00000000004e3ac1 in btinsert (rel=0x7eff9eef7c28, values=<optimized out>, isnull=<optimized out>, ht_ctid=0x2270d18, heapRel=0x7eff9eee6e08, checkUnique=UNIQUE_CHECK_NO, indexInfo=0x221fed0) at nbtree.c:210 #11 0x000000000062faca in ExecInsertIndexTuples (slot=0x2270ce8, estate=estate@entry=0x2217418, noDupErr=noDupErr@entry=false, specConflict=specConflict@entry=0x0, arbiterIndexes=arbiterIndexes@entry=0x0) at execIndexing.c:393 #12 0x00000000005bcb90 in CopyMultiInsertBufferFlush (buffer=0x22112e8, miinfo=<synthetic pointer>) at copy.c:2512 #13 CopyMultiInsertInfoFlush (curr_rri=0x221fab0, miinfo=<synthetic pointer>) at copy.c:2593 #14 CopyFrom (cstate=cstate@entry=0x221f860) at copy.c:3251 #15 0x00000000005bd92f in DoCopy (pstate=pstate@entry=0x221db68, stmt=stmt@entry=0x21ebec8, stmt_location=0, stmt_len=501, processed=processed@entry=0x7ffe3b67ff88) at copy.c:1074 #16 0x0000000000795e5e in standard_ProcessUtility (pstmt=pstmt@entry=0x21ebd28, queryString=queryString@entry=0x20c9488 "COPY fund60query.tbtatransaccount2 (in_client_no, bank_no, ta_code, seller_code, bank_acc, asset_acc, ta_client, acc_status, open_date, reserve1, reserve2, create_time, modify_timestamp, version, bran"..., context=context@entry=PROCESS_UTILITY_TOPLEVEL, params=params@entry=0x0, queryEnv=queryEnv@entry=0x0, dest=dest@entry=0x20ca340, qc=qc@entry=0x7ffe3b680a30) at utility.c:959 #17 0x00007eff93c36808 in ProcessUtilityInternal (pstmt=0x21ebd28, pstmt@entry=0x20ca698, queryString=queryString@entry=0x20c9488 "COPY fund60query.tbtatransaccount2 (in_client_no, bank_no, ta_code, seller_code, bank_acc, asset_acc, ta_client, acc_status, open_date, reserve1, reserve2, create_time, modify_timestamp, version, bran"..., context=context@entry=PROCESS_UTILITY_TOPLEVEL, params=params@entry=0x0, queryEnv=queryEnv@entry=0x0, dest=dest@entry=0x20ca340, completionTag=completionTag@entry=0x7ffe3b680a30) at commands/utility_hook.c:581 #18 0x00007eff93c37060 in multi_ProcessUtility (pstmt=0x20ca698, queryString=0x20c9488 "COPY fund60query.tbtatransaccount2 (in_client_no, bank_no, ta_code, seller_code, bank_acc, asset_acc, ta_client, acc_status, open_date, reserve1, reserve2, create_time, modify_timestamp, version, bran"..., context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=0x20ca340, completionTag=0x7ffe3b680a30) at commands/utility_hook.c:263 #19 0x00007eff910b93de in pgss_ProcessUtility (pstmt=0x20ca698, queryString=0x20c9488 "COPY fund60query.tbtatransaccount2 (in_client_no, bank_no, ta_code, seller_code, bank_acc, asset_acc, ta_client, acc_status, open_date, reserve1, reserve2, create_time, modify_timestamp, version, bran"..., context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=0x20ca340, qc=0x7ffe3b680a30) at pg_stat_statements.c:1156 #20 0x00007eff90eb057c in ltsa_ProcessUtility (pstmt=0x20ca698, queryString=0x20c9488 "COPY fund60query.tbtatransaccount2 (in_client_no, bank_no, ta_code, seller_code, bank_acc, asset_acc, ta_client, acc_status, open_date, reserve1, reserve2, create_time, modify_timestamp, version, bran"..., context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=0x20ca340, qc=0x7ffe3b680a30) at lt_stat_activity.c:315 #21 0x00007eff9088ec69 in pgaudit_ProcessUtility_hook (pstmt=0x20ca698, queryString=<optimized out>, context=<optimized out>, params=<optimized out>, queryEnv=<optimized out>, dest=<optimized out>, qc=0x7ffe3b680a30) at pgaudit.c:1412 #22 0x00007eff9067648b in pg_hint_plan_ProcessUtility (pstmt=<optimized out>, queryString=<optimized out>, context=<optimized out>, params=<optimized out>, queryEnv=<optimized out>, dest=<optimized out>, qc=0x7ffe3b680a30) at pg_hint_plan.c:5846 #23 0x00007eff90252fcc in LtStandbyProcessUtility (pstmt=0x20ca698, queryString=0x20c9488 "COPY fund60query.tbtatransaccount2 (in_client_no, bank_no, ta_code, seller_code, bank_acc, asset_acc, ta_client, acc_status, open_date, reserve1, reserve2, create_time, modify_timestamp, version, bran"..., context=<optimized out>, params=0x0, queryEnv=<optimized out>, dest=0x20ca340, qc=0x7ffe3b680a30) at lt_standby_forward.c:351 #24 0x00007eff90038ec7 in pathman_process_utility_hook (first_arg=0x20ca698, queryString=0x20c9488 "COPY fund60query.tbtatransaccount2 (in_client_no, bank_no, ta_code, seller_code, bank_acc, asset_acc, ta_client, acc_status, open_date, reserve1, reserve2, create_time, modify_timestamp, version, bran"..., context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=<optimized out>, dest=<optimized out>, queryCompletion=0x7ffe3b680a30) at src/hooks.c:1113 #25 0x0000000000796390 in ProcessUtility (pstmt=pstmt@entry=0x20ca698, queryString=0x20c9488 "COPY fund60query.tbtatransaccount2 (in_client_no, bank_no, ta_code, seller_code, bank_acc, asset_acc, ta_client, acc_status, open_date, reserve1, reserve2, create_time, modify_timestamp, version, bran"..., context=context@entry=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=dest@entry=0x20ca340, qc=qc@entry=0x7ffe3b680a30) at utility.c:753 #26 0x0000000000792dac in PortalRunUtility (portal=0x2195ee8, pstmt=0x20ca698, isTopLevel=<optimized out>, setHoldSnapshot=<optimized out>, dest=0x20ca340, qc=0x7ffe3b680a30) at pquery.c:1161 #27 0x00000000007937f9 in PortalRunMulti (portal=portal@entry=0x2195ee8, isTopLevel=isTopLevel@entry=true, setHoldSnapshot=setHoldSnapshot@entry=false, dest=dest@entry=0x20ca340, altdest=altdest@entry=0x20ca340, qc=qc@entry=0x7ffe3b680a30) at pquery.c:1314 #28 0x00000000007942ed in PortalRun (portal=portal@entry=0x2195ee8, count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true, dest=dest@entry=0x20ca340, altdest=altdest@entry=0x20ca340, qc=qc@entry=0x7ffe3b680a30) at pquery.c:783 #29 0x000000000078fffe in exec_simple_query (query_string=0x20c9488 "COPY fund60query.tbtatransaccount2 (in_client_no, bank_no, ta_code, seller_code, bank_acc, asset_acc, ta_client, acc_status, open_date, reserve1, reserve2, create_time, modify_timestamp, version, bran"...) at postgres.c:1326 #30 0x0000000000791358 in PostgresMain (argc=<optimized out>, argv=argv@entry=0x21315d0, dbname=0x21314f0 "fund60_perf", username=<optimized out>) at postgres.c:4445 #31 0x000000000048847e in BackendRun (port=<optimized out>, port=<optimized out>) at postmaster.c:4883 #32 BackendStartup (port=0x2124740) at postmaster.c:4567 #33 ServerLoop () at postmaster.c:1854 #34 0x000000000071b076 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x20c3f90) at postmaster.c:1488 #35 0x000000000048946d in main (argc=3, argv=0x20c3f90) at main.c:231
heap_multi_insert(Relation relation, TupleTableSlot ** slots, int ntuples, unsigned int cid, int options, BulkInsertState bistate) (\home\zjh\Sources\postgresql-13.3\src\backend\access\heap\heapam.c:2127) table_multi_insert(struct BulkInsertStateData * bistate, int options, CommandId cid, int nslots, TupleTableSlot ** slots, Relation rel) (\home\zjh\Sources\postgresql-13.3\src\include\access\tableam.h:1214) CopyMultiInsertBufferFlush(CopyMultiInsertBuffer * buffer, CopyMultiInsertInfo * miinfo) (\home\zjh\Sources\postgresql-13.3\src\backend\commands\copy.c:2494) CopyMultiInsertInfoFlush(ResultRelInfo * curr_rri, CopyMultiInsertInfo * miinfo) (\home\zjh\Sources\postgresql-13.3\src\backend\commands\copy.c:2594) CopyFrom(CopyState cstate) (\home\zjh\Sources\postgresql-13.3\src\backend\commands\copy.c:3311) DoCopy(ParseState * pstate, const CopyStmt * stmt, int stmt_location, int stmt_len, uint64 * processed) (\home\zjh\Sources\postgresql-13.3\src\backend\commands\copy.c:1075) standard_ProcessUtility(PlannedStmt * pstmt, const char * queryString, enum {...} context, ParamListInfo params, QueryEnvironment * queryEnv, DestReceiver * dest, QueryCompletion * qc) (\home\zjh\Sources\postgresql-13.3\src\backend\tcop\utility.c:1028) lt_stat_statements.so!pgss_ProcessUtility(PlannedStmt * pstmt, const char * queryString, ProcessUtilityContext context, ParamListInfo params, QueryEnvironment * queryEnv, DestReceiver * dest, QueryCompletion * qc) (\home\zjh\Sources\postgresql-13.3\contrib\pg_stat_statements\pg_stat_statements.c:1163) lt_stat_activity.so!ltsa_ProcessUtility(PlannedStmt * pstmt, const char * queryString, ProcessUtilityContext context, ParamListInfo params, QueryEnvironment * queryEnv, DestReceiver * dest, QueryCompletion * qc) (\home\zjh\Sources\postgresql-13.3\contrib\lt_stat_activity\lt_stat_activity.c:315) lt_hint_plan.so!pg_hint_plan_ProcessUtility(PlannedStmt * pstmt, const char * queryString, ProcessUtilityContext context, ParamListInfo params, QueryEnvironment * queryEnv, DestReceiver * dest, QueryCompletion * qc) (\home\zjh\Sources\postgresql-13.3\contrib\pg_hint_plan\pg_hint_plan.c:7545) ProcessUtility(PlannedStmt * pstmt, const char * queryString, enum {...} context, struct ParamListInfoData * params, QueryEnvironment * queryEnv, DestReceiver * dest, QueryCompletion * qc) (\home\zjh\Sources\postgresql-13.3\src\backend\tcop\utility.c:768) PortalRunUtility(struct PortalData * portal, PlannedStmt * pstmt, _Bool isTopLevel, _Bool setHoldSnapshot, DestReceiver * dest, QueryCompletion * qc) (\home\zjh\Sources\postgresql-13.3\src\backend\tcop\pquery.c:1182) PortalRunMulti(struct PortalData * portal, _Bool isTopLevel, _Bool setHoldSnapshot, DestReceiver * dest, DestReceiver * altdest, QueryCompletion * qc) (\home\zjh\Sources\postgresql-13.3\src\backend\tcop\pquery.c:1349) PortalRun(Portal portal, long count, _Bool isTopLevel, _Bool run_once, DestReceiver * dest, DestReceiver * altdest, QueryCompletion * qc) (\home\zjh\Sources\postgresql-13.3\src\backend\tcop\pquery.c:791) exec_simple_query(const char * query_string) (\home\zjh\Sources\postgresql-13.3\src\backend\tcop\postgres.c:1262) PostgresMain(int argc, char ** argv, const char * dbname, const char * username) (\home\zjh\Sources\postgresql-13.3\src\backend\tcop\postgres.c:4498) BackendRun() (\home\zjh\Sources\postgresql-13.3\src\backend\postmaster\postmaster.c:4982) BackendStartup(Port * port) (\home\zjh\Sources\postgresql-13.3\src\backend\postmaster\postmaster.c:4666) ServerLoop() (\home\zjh\Sources\postgresql-13.3\src\backend\postmaster\postmaster.c:1929) PostmasterMain(int argc, char ** argv) (\home\zjh\Sources\postgresql-13.3\src\backend\postmaster\postmaster.c:1563)
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
2017-04-29 Markdown语法学习(Github/git.oschina.net上README.md书写规范)及编辑器推荐
2017-04-29 spider RPC更新至2.0.0-RELEASE