* This method is used to determine how much memory a specific operator * is supposed to use (in KB). */
| 2221 | * is supposed to use (in KB). |
| 2222 | */ |
| 2223 | uint64 PlanStateOperatorMemKB(const PlanState *ps) |
| 2224 | { |
| 2225 | Assert(ps); |
| 2226 | Assert(ps->plan); |
| 2227 | uint64 result = 0; |
| 2228 | if (ps->plan->operatorMemKB == 0) |
| 2229 | { |
| 2230 | /** |
| 2231 | * There are some statements that do not go through the resource queue and these |
| 2232 | * plans dont get decorated with the operatorMemKB. Someday, we should fix resource queues. |
| 2233 | */ |
| 2234 | result = work_mem; |
| 2235 | } |
| 2236 | else |
| 2237 | { |
| 2238 | result = ps->plan->operatorMemKB; |
| 2239 | } |
| 2240 | |
| 2241 | return result; |
| 2242 | } |
| 2243 | |
| 2244 | /** |
| 2245 | * Methods to find motionstate object within a planstate tree given a motion id (which is the same as slice index) |
no outgoing calls
no test coverage detected