上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 104 下一页
摘要: 基本上是没有声明头文件造成可以 gcc 加 -E 参数然后,用文本编辑器打开生成的 .o文件,看其具体缺少哪些信息的状况。 阅读全文
posted @ 2013-06-03 12:18 健哥的数据花园 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 接前面,再次上溯。可以知道:ExecProcNode: 会根据情况不同,将PlanNode转为各种类型Node再参与运算:TupleTableSlot *ExecProcNode(PlanState *node){ //ExecProcNode fprintf(stderr,"ExecProcNode:node->ss_currentScanDesc->rs_startblock is: %d by process %d\n", ((SeqScanState *) node)->ss_currentScanDesc->rs_startblock,ge 阅读全文
posted @ 2013-06-03 10:29 健哥的数据花园 阅读(742) 评论(0) 推荐(0) 编辑
摘要: 接前面,看被SeqNext所调用的heap_getnext:HeapTupleheap_getnext(HeapScanDesc scan, ScanDirection direction){ /* Note: no locking manipulations needed */ HEAPDEBUG_1; /* heap_getnext( info ) */ if (scan->rs_pageatatime) heapgettup_pagemode(scan, direction,scan->rs_nkeys, scan->rs_k... 阅读全文
posted @ 2013-06-03 10:13 健哥的数据花园 阅读(560) 评论(0) 推荐(0) 编辑
摘要: 接前面,看 SeqNext 函数:/* ---------------------------------------------------------------- * SeqNext * * This is a workhorse for ExecSeqScan * ---------------------------------------------------------------- */static TupleTableSlot *SeqNext(SeqScanState *node){ HeapTuple tuple; Heap... 阅读全文
posted @ 2013-05-31 17:30 健哥的数据花园 阅读(509) 评论(0) 推荐(0) 编辑
摘要: 接前面,这次重点分析 ExecScan:其for 循环内部: for (;;) { TupleTableSlot *slot; CHECK_FOR_INTERRUPTS(); slot = ExecScanFetch(node, accessMtd, recheckMtd); /* * if the slot returned by the accessMtd contains NULL, then it means * there is nothing more to scan so we j... 阅读全文
posted @ 2013-05-31 15:36 健哥的数据花园 阅读(478) 评论(0) 推荐(0) 编辑
摘要: 这里又遇到了函数指针:executor.h头文件中,定义了 ExecScanAccessMtd 指针,或者定义了一个ExecScanAccessMtd 函数原型的指针/* * prototypes from functions in execScan.c */typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState *node);之后,在NodeSeqScan.c处有一个实现:/* ---------------------------------------------------------------- * SeqNex... 阅读全文
posted @ 2013-05-31 14:18 健哥的数据花园 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 看:TupleTableSlot *ExecProcNode(PlanState *node){ TupleTableSlot *result; CHECK_FOR_INTERRUPTS(); if (node->chgParam != NULL) /* something changed */ ExecReScan(node); /* let ReScan handle this */ if (node->instrument) InstrStartNode(node->instrument); switch (node... 阅读全文
posted @ 2013-05-31 09:53 健哥的数据花园 阅读(683) 评论(0) 推荐(0) 编辑
摘要: 接前面:/* ---------------------------------------------------------------- * ExecutorRun * * This is the main routine of the executor module. It accepts * the query descriptor from the traffic cop and executes the * query plan. * * ExecutorStart must have been called ... 阅读全文
posted @ 2013-05-30 15:23 健哥的数据花园 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 接前面深入考察 PortalRun: 初步判断,其核心在于boolPortalRun(Portal portal, long count, bool isTopLevel, DestReceiver *dest, DestReceiver *altdest, char *completionTag){ ... portal->status = PORTAL_ACTIVE; ... PG_TRY(); { ActivePortal = portal; CurrentResourceOwner = por... 阅读全文
posted @ 2013-05-30 14:49 健哥的数据花园 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 接前面,回溯调用关系:exec_simple_query --> PortalStart --> ExecutorStart --> StandardExecutorStart --> InitPlan再回到 exec_simple_query 来:事前知道,表 tst04 对应的文件名为 16393。postgres=# select oid from pg_class where relname='tst04'; oid ------- 16393(1 row)postgres=# 看 exec_simple_query,加点调试信息:static 阅读全文
posted @ 2013-05-30 13:39 健哥的数据花园 阅读(355) 评论(0) 推荐(0) 编辑
上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 104 下一页