摘要: 接前面:/* ---------------------------------------------------------------- * 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) 编辑
摘要: 接前面,在 PortalStart 中调用了 ExecutorStart,ExecutorStart 会调用 InitPlan:/* ---------------------------------------------------------------- * InitPlan * * Initializes the query plan: open files, allocate storage * and start up the rule manager * -----------------------------------------... 阅读全文
posted @ 2013-05-30 12:12 健哥的数据花园 阅读(531) 评论(0) 推荐(0) 编辑