Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
227f817c
Commit
227f817c
authored
Apr 02, 2009
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for additional DTrace probes.
Robert Lor
parent
3df4fa69
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
112 additions
and
15 deletions
+112
-15
src/backend/access/transam/slru.c
src/backend/access/transam/slru.c
+31
-1
src/backend/executor/execScan.c
src/backend/executor/execScan.c
+4
-1
src/backend/executor/nodeAgg.c
src/backend/executor/nodeAgg.c
+4
-1
src/backend/executor/nodeGroup.c
src/backend/executor/nodeGroup.c
+4
-1
src/backend/executor/nodeHash.c
src/backend/executor/nodeHash.c
+4
-1
src/backend/executor/nodeHashjoin.c
src/backend/executor/nodeHashjoin.c
+4
-1
src/backend/executor/nodeLimit.c
src/backend/executor/nodeLimit.c
+4
-1
src/backend/executor/nodeMaterial.c
src/backend/executor/nodeMaterial.c
+4
-1
src/backend/executor/nodeMergejoin.c
src/backend/executor/nodeMergejoin.c
+4
-1
src/backend/executor/nodeNestloop.c
src/backend/executor/nodeNestloop.c
+4
-1
src/backend/executor/nodeSetOp.c
src/backend/executor/nodeSetOp.c
+4
-1
src/backend/executor/nodeSort.c
src/backend/executor/nodeSort.c
+4
-1
src/backend/executor/nodeSubplan.c
src/backend/executor/nodeSubplan.c
+6
-1
src/backend/executor/nodeUnique.c
src/backend/executor/nodeUnique.c
+4
-1
src/backend/utils/probes.d
src/backend/utils/probes.d
+27
-1
No files found.
src/backend/access/transam/slru.c
View file @
227f817c
...
...
@@ -41,7 +41,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/slru.c,v 1.4
5 2009/01/01 17:23:36
momjian Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/slru.c,v 1.4
6 2009/04/02 19:14:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -57,6 +57,7 @@
#include "storage/fd.h"
#include "storage/shmem.h"
#include "miscadmin.h"
#include "pg_trace.h"
/*
...
...
@@ -372,6 +373,7 @@ SimpleLruReadPage(SlruCtl ctl, int pageno, bool write_ok,
{
SlruShared
shared
=
ctl
->
shared
;
TRACE_POSTGRESQL_SLRU_READPAGE_START
((
uintptr_t
)
ctl
,
pageno
,
write_ok
,
xid
);
/* Outer loop handles restart if we must wait for someone else's I/O */
for
(;;)
{
...
...
@@ -399,6 +401,7 @@ SimpleLruReadPage(SlruCtl ctl, int pageno, bool write_ok,
}
/* Otherwise, it's ready to use */
SlruRecentlyUsed
(
shared
,
slotno
);
TRACE_POSTGRESQL_SLRU_READPAGE_DONE
(
slotno
);
return
slotno
;
}
...
...
@@ -446,6 +449,7 @@ SimpleLruReadPage(SlruCtl ctl, int pageno, bool write_ok,
SlruReportIOError
(
ctl
,
pageno
,
xid
);
SlruRecentlyUsed
(
shared
,
slotno
);
TRACE_POSTGRESQL_SLRU_READPAGE_DONE
(
slotno
);
return
slotno
;
}
}
...
...
@@ -470,6 +474,8 @@ SimpleLruReadPage_ReadOnly(SlruCtl ctl, int pageno, TransactionId xid)
SlruShared
shared
=
ctl
->
shared
;
int
slotno
;
TRACE_POSTGRESQL_SLRU_READPAGE_READONLY
((
uintptr_t
)
ctl
,
pageno
,
xid
);
/* Try to find the page while holding only shared lock */
LWLockAcquire
(
shared
->
ControlLock
,
LW_SHARED
);
...
...
@@ -511,6 +517,8 @@ SimpleLruWritePage(SlruCtl ctl, int slotno, SlruFlush fdata)
int
pageno
=
shared
->
page_number
[
slotno
];
bool
ok
;
TRACE_POSTGRESQL_SLRU_WRITEPAGE_START
((
uintptr_t
)
ctl
,
pageno
,
slotno
);
/* If a write is in progress, wait for it to finish */
while
(
shared
->
page_status
[
slotno
]
==
SLRU_PAGE_WRITE_IN_PROGRESS
&&
shared
->
page_number
[
slotno
]
==
pageno
)
...
...
@@ -525,7 +533,10 @@ SimpleLruWritePage(SlruCtl ctl, int slotno, SlruFlush fdata)
if
(
!
shared
->
page_dirty
[
slotno
]
||
shared
->
page_status
[
slotno
]
!=
SLRU_PAGE_VALID
||
shared
->
page_number
[
slotno
]
!=
pageno
)
{
TRACE_POSTGRESQL_SLRU_WRITEPAGE_DONE
();
return
;
}
/*
* Mark the slot write-busy, and clear the dirtybit. After this point, a
...
...
@@ -569,6 +580,8 @@ SimpleLruWritePage(SlruCtl ctl, int slotno, SlruFlush fdata)
/* Now it's okay to ereport if we failed */
if
(
!
ok
)
SlruReportIOError
(
ctl
,
pageno
,
InvalidTransactionId
);
TRACE_POSTGRESQL_SLRU_WRITEPAGE_DONE
();
}
/*
...
...
@@ -593,6 +606,8 @@ SlruPhysicalReadPage(SlruCtl ctl, int pageno, int slotno)
SlruFileName
(
ctl
,
path
,
segno
);
TRACE_POSTGRESQL_SLRU_READPAGE_PHYSICAL_START
((
uintptr_t
)
ctl
,
path
,
pageno
,
slotno
);
/*
* In a crash-and-restart situation, it's possible for us to receive
* commands to set the commit status of transactions whose bits are in
...
...
@@ -607,6 +622,7 @@ SlruPhysicalReadPage(SlruCtl ctl, int pageno, int slotno)
{
slru_errcause
=
SLRU_OPEN_FAILED
;
slru_errno
=
errno
;
TRACE_POSTGRESQL_SLRU_READPAGE_PHYSICAL_DONE
(
false
,
slru_errcause
,
slru_errno
);
return
false
;
}
...
...
@@ -614,6 +630,7 @@ SlruPhysicalReadPage(SlruCtl ctl, int pageno, int slotno)
(
errmsg
(
"file
\"
%s
\"
doesn't exist, reading as zeroes"
,
path
)));
MemSet
(
shared
->
page_buffer
[
slotno
],
0
,
BLCKSZ
);
TRACE_POSTGRESQL_SLRU_READPAGE_PHYSICAL_DONE
(
true
,
-
1
,
-
1
);
return
true
;
}
...
...
@@ -622,6 +639,7 @@ SlruPhysicalReadPage(SlruCtl ctl, int pageno, int slotno)
slru_errcause
=
SLRU_SEEK_FAILED
;
slru_errno
=
errno
;
close
(
fd
);
TRACE_POSTGRESQL_SLRU_READPAGE_PHYSICAL_DONE
(
false
,
slru_errcause
,
slru_errno
);
return
false
;
}
...
...
@@ -631,6 +649,7 @@ SlruPhysicalReadPage(SlruCtl ctl, int pageno, int slotno)
slru_errcause
=
SLRU_READ_FAILED
;
slru_errno
=
errno
;
close
(
fd
);
TRACE_POSTGRESQL_SLRU_READPAGE_PHYSICAL_DONE
(
false
,
slru_errcause
,
slru_errno
);
return
false
;
}
...
...
@@ -638,9 +657,12 @@ SlruPhysicalReadPage(SlruCtl ctl, int pageno, int slotno)
{
slru_errcause
=
SLRU_CLOSE_FAILED
;
slru_errno
=
errno
;
TRACE_POSTGRESQL_SLRU_READPAGE_PHYSICAL_DONE
(
false
,
slru_errcause
,
slru_errno
);
return
false
;
}
TRACE_POSTGRESQL_SLRU_READPAGE_PHYSICAL_DONE
(
true
,
-
1
,
-
1
);
return
true
;
}
...
...
@@ -668,6 +690,8 @@ SlruPhysicalWritePage(SlruCtl ctl, int pageno, int slotno, SlruFlush fdata)
char
path
[
MAXPGPATH
];
int
fd
=
-
1
;
TRACE_POSTGRESQL_SLRU_WRITEPAGE_PHYSICAL_START
((
uintptr_t
)
ctl
,
pageno
,
slotno
);
/*
* Honor the write-WAL-before-data rule, if appropriate, so that we do not
* write out data before associated WAL records. This is the same action
...
...
@@ -753,6 +777,7 @@ SlruPhysicalWritePage(SlruCtl ctl, int pageno, int slotno, SlruFlush fdata)
{
slru_errcause
=
SLRU_OPEN_FAILED
;
slru_errno
=
errno
;
TRACE_POSTGRESQL_SLRU_WRITEPAGE_PHYSICAL_DONE
(
false
,
slru_errcause
,
slru_errno
);
return
false
;
}
...
...
@@ -781,6 +806,7 @@ SlruPhysicalWritePage(SlruCtl ctl, int pageno, int slotno, SlruFlush fdata)
slru_errno
=
errno
;
if
(
!
fdata
)
close
(
fd
);
TRACE_POSTGRESQL_SLRU_WRITEPAGE_PHYSICAL_DONE
(
false
,
slru_errcause
,
slru_errno
);
return
false
;
}
...
...
@@ -794,6 +820,7 @@ SlruPhysicalWritePage(SlruCtl ctl, int pageno, int slotno, SlruFlush fdata)
slru_errno
=
errno
;
if
(
!
fdata
)
close
(
fd
);
TRACE_POSTGRESQL_SLRU_WRITEPAGE_PHYSICAL_DONE
(
false
,
slru_errcause
,
slru_errno
);
return
false
;
}
...
...
@@ -808,6 +835,7 @@ SlruPhysicalWritePage(SlruCtl ctl, int pageno, int slotno, SlruFlush fdata)
slru_errcause
=
SLRU_FSYNC_FAILED
;
slru_errno
=
errno
;
close
(
fd
);
TRACE_POSTGRESQL_SLRU_WRITEPAGE_PHYSICAL_DONE
(
false
,
slru_errcause
,
slru_errno
);
return
false
;
}
...
...
@@ -815,10 +843,12 @@ SlruPhysicalWritePage(SlruCtl ctl, int pageno, int slotno, SlruFlush fdata)
{
slru_errcause
=
SLRU_CLOSE_FAILED
;
slru_errno
=
errno
;
TRACE_POSTGRESQL_SLRU_WRITEPAGE_PHYSICAL_DONE
(
false
,
slru_errcause
,
slru_errno
);
return
false
;
}
}
TRACE_POSTGRESQL_SLRU_WRITEPAGE_PHYSICAL_DONE
(
true
,
-
1
,
-
1
);
return
true
;
}
...
...
src/backend/executor/execScan.c
View file @
227f817c
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execScan.c,v 1.4
4 2009/01/01 17:23:41
momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/execScan.c,v 1.4
5 2009/04/02 19:14:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -20,6 +20,7 @@
#include "executor/executor.h"
#include "miscadmin.h"
#include "pg_trace.h"
#include "utils/memutils.h"
...
...
@@ -60,6 +61,8 @@ ExecScan(ScanState *node,
qual
=
node
->
ps
.
qual
;
projInfo
=
node
->
ps
.
ps_ProjInfo
;
TRACE_POSTGRESQL_EXECUTOR_SCAN
((
uintptr_t
)
node
,
((
Scan
*
)
node
->
ps
.
plan
)
->
scanrelid
,
(
uintptr_t
)
accessMtd
);
/*
* If we have neither a qual to check nor a projection to do, just skip
* all the overhead and return the raw scan tuple.
...
...
src/backend/executor/nodeAgg.c
View file @
227f817c
...
...
@@ -61,7 +61,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.16
4 2009/01/01 17:23:41
momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.16
5 2009/04/02 19:14:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -79,6 +79,7 @@
#include "parser/parse_agg.h"
#include "parser/parse_coerce.h"
#include "parser/parse_oper.h"
#include "pg_trace.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
...
...
@@ -814,6 +815,8 @@ ExecAgg(AggState *node)
if
(
node
->
agg_done
)
return
NULL
;
TRACE_POSTGRESQL_EXECUTOR_AGG
((
uintptr_t
)
node
,
((
Agg
*
)
node
->
ss
.
ps
.
plan
)
->
aggstrategy
);
/*
* Check to see if we're still projecting out tuples from a previous agg
* tuple (because there is a function-returning-set in the projection
...
...
src/backend/executor/nodeGroup.c
View file @
227f817c
...
...
@@ -15,7 +15,7 @@
* locate group boundaries.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeGroup.c,v 1.7
3 2009/01/01 17:23:41
momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeGroup.c,v 1.7
4 2009/04/02 19:14:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -24,6 +24,7 @@
#include "executor/executor.h"
#include "executor/nodeGroup.h"
#include "pg_trace.h"
/*
...
...
@@ -49,6 +50,8 @@ ExecGroup(GroupState *node)
numCols
=
((
Group
*
)
node
->
ss
.
ps
.
plan
)
->
numCols
;
grpColIdx
=
((
Group
*
)
node
->
ss
.
ps
.
plan
)
->
grpColIdx
;
TRACE_POSTGRESQL_EXECUTOR_GROUP
((
uintptr_t
)
node
,
numCols
);
/*
* Check to see if we're still projecting out tuples from a previous group
* tuple (because there is a function-returning-set in the projection
...
...
src/backend/executor/nodeHash.c
View file @
227f817c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.11
8 2009/03/21 00:04:38 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.11
9 2009/04/02 19:14:33 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -33,6 +33,7 @@
#include "executor/nodeHashjoin.h"
#include "miscadmin.h"
#include "parser/parse_expr.h"
#include "pg_trace.h"
#include "utils/dynahash.h"
#include "utils/memutils.h"
#include "utils/lsyscache.h"
...
...
@@ -79,6 +80,8 @@ MultiExecHash(HashState *node)
ExprContext
*
econtext
;
uint32
hashvalue
;
TRACE_POSTGRESQL_EXECUTOR_HASH_MULTI
((
uintptr_t
)
node
);
/* must provide our own instrumentation support */
if
(
node
->
ps
.
instrument
)
InstrStartNode
(
node
->
ps
.
instrument
);
...
...
src/backend/executor/nodeHashjoin.c
View file @
227f817c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.9
8 2009/03/21 00:04:38 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.9
9 2009/04/02 19:14:33 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -19,6 +19,7 @@
#include "executor/hashjoin.h"
#include "executor/nodeHash.h"
#include "executor/nodeHashjoin.h"
#include "pg_trace.h"
#include "utils/memutils.h"
...
...
@@ -61,6 +62,8 @@ ExecHashJoin(HashJoinState *node)
uint32
hashvalue
;
int
batchno
;
TRACE_POSTGRESQL_EXECUTOR_HASHJOIN
((
uintptr_t
)
node
);
/*
* get information from HashJoin node
*/
...
...
src/backend/executor/nodeLimit.c
View file @
227f817c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeLimit.c,v 1.3
6 2009/03/04 10:55:00 petere
Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeLimit.c,v 1.3
7 2009/04/02 19:14:33 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -23,6 +23,7 @@
#include "executor/executor.h"
#include "executor/nodeLimit.h"
#include "pg_trace.h"
static
void
recompute_limits
(
LimitState
*
node
);
...
...
@@ -41,6 +42,8 @@ ExecLimit(LimitState *node)
TupleTableSlot
*
slot
;
PlanState
*
outerPlan
;
TRACE_POSTGRESQL_EXECUTOR_LIMIT
((
uintptr_t
)
node
);
/*
* get information from the node
*/
...
...
src/backend/executor/nodeMaterial.c
View file @
227f817c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeMaterial.c,v 1.6
6 2009/03/27 18:30:21 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeMaterial.c,v 1.6
7 2009/04/02 19:14:33 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -24,6 +24,7 @@
#include "executor/executor.h"
#include "executor/nodeMaterial.h"
#include "miscadmin.h"
#include "pg_trace.h"
/* ----------------------------------------------------------------
* ExecMaterial
...
...
@@ -45,6 +46,8 @@ ExecMaterial(MaterialState *node)
bool
eof_tuplestore
;
TupleTableSlot
*
slot
;
TRACE_POSTGRESQL_EXECUTOR_MATERIAL
((
uintptr_t
)
node
);
/*
* get state info from node
*/
...
...
src/backend/executor/nodeMergejoin.c
View file @
227f817c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeMergejoin.c,v 1.9
4 2009/01/01 17:23:42
momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeMergejoin.c,v 1.9
5 2009/04/02 19:14:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -98,6 +98,7 @@
#include "executor/execdefs.h"
#include "executor/nodeMergejoin.h"
#include "miscadmin.h"
#include "pg_trace.h"
#include "utils/acl.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
...
...
@@ -565,6 +566,8 @@ ExecMergeJoin(MergeJoinState *node)
bool
doFillOuter
;
bool
doFillInner
;
TRACE_POSTGRESQL_EXECUTOR_MERGEJOIN
((
uintptr_t
)
node
);
/*
* get information from node
*/
...
...
src/backend/executor/nodeNestloop.c
View file @
227f817c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeNestloop.c,v 1.5
0 2009/01/01 17:23:42
momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeNestloop.c,v 1.5
1 2009/04/02 19:14:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -23,6 +23,7 @@
#include "executor/execdebug.h"
#include "executor/nodeNestloop.h"
#include "pg_trace.h"
#include "utils/memutils.h"
...
...
@@ -67,6 +68,8 @@ ExecNestLoop(NestLoopState *node)
List
*
otherqual
;
ExprContext
*
econtext
;
TRACE_POSTGRESQL_EXECUTOR_NESTLOOP
((
uintptr_t
)
node
);
/*
* get information from the node
*/
...
...
src/backend/executor/nodeSetOp.c
View file @
227f817c
...
...
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeSetOp.c,v 1.2
8 2009/01/01 17:23:42
momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeSetOp.c,v 1.2
9 2009/04/02 19:14:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -46,6 +46,7 @@
#include "executor/executor.h"
#include "executor/nodeSetOp.h"
#include "pg_trace.h"
#include "utils/memutils.h"
...
...
@@ -196,6 +197,8 @@ ExecSetOp(SetOpState *node)
SetOp
*
plannode
=
(
SetOp
*
)
node
->
ps
.
plan
;
TupleTableSlot
*
resultTupleSlot
=
node
->
ps
.
ps_ResultTupleSlot
;
TRACE_POSTGRESQL_EXECUTOR_SETOP
((
uintptr_t
)
node
);
/*
* If the previously-returned tuple needs to be returned more than once,
* keep returning it.
...
...
src/backend/executor/nodeSort.c
View file @
227f817c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeSort.c,v 1.6
3 2009/01/01 17:23:42
momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeSort.c,v 1.6
4 2009/04/02 19:14:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -18,6 +18,7 @@
#include "executor/execdebug.h"
#include "executor/nodeSort.h"
#include "miscadmin.h"
#include "pg_trace.h"
#include "utils/tuplesort.h"
...
...
@@ -53,6 +54,8 @@ ExecSort(SortState *node)
dir
=
estate
->
es_direction
;
tuplesortstate
=
(
Tuplesortstate
*
)
node
->
tuplesortstate
;
TRACE_POSTGRESQL_EXECUTOR_SORT
((
uintptr_t
)
node
,
dir
);
/*
* If first time through, read all tuples from outer plan and pass them to
* tuplesort.c. Subsequent calls just fetch tuples from tuplesort.
...
...
src/backend/executor/nodeSubplan.c
View file @
227f817c
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeSubplan.c,v 1.9
6 2009/01/01 17:23:42
momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeSubplan.c,v 1.9
7 2009/04/02 19:14:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -24,6 +24,7 @@
#include "executor/nodeSubplan.h"
#include "nodes/makefuncs.h"
#include "optimizer/clauses.h"
#include "pg_trace.h"
#include "utils/array.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
...
...
@@ -92,6 +93,8 @@ ExecHashSubPlan(SubPlanState *node,
ExprContext
*
innerecontext
=
node
->
innerecontext
;
TupleTableSlot
*
slot
;
TRACE_POSTGRESQL_EXECUTOR_SUBPLAN_HASH
((
uintptr_t
)
node
);
/* Shouldn't have any direct correlation Vars */
if
(
subplan
->
parParam
!=
NIL
||
node
->
args
!=
NIL
)
elog
(
ERROR
,
"hashed subplan with direct correlation not supported"
);
...
...
@@ -227,6 +230,8 @@ ExecScanSubPlan(SubPlanState *node,
ListCell
*
l
;
ArrayBuildState
*
astate
=
NULL
;
TRACE_POSTGRESQL_EXECUTOR_SUBPLAN_SCAN
((
uintptr_t
)
node
);
/*
* We are probably in a short-lived expression-evaluation context. Switch
* to the per-query context for manipulating the child plan's chgParam,
...
...
src/backend/executor/nodeUnique.c
View file @
227f817c
...
...
@@ -16,7 +16,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeUnique.c,v 1.5
8 2009/01/01 17:23:42
momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeUnique.c,v 1.5
9 2009/04/02 19:14:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -35,6 +35,7 @@
#include "executor/executor.h"
#include "executor/nodeUnique.h"
#include "pg_trace.h"
#include "utils/memutils.h"
...
...
@@ -50,6 +51,8 @@ ExecUnique(UniqueState *node)
TupleTableSlot
*
slot
;
PlanState
*
outerPlan
;
TRACE_POSTGRESQL_EXECUTOR_UNIQUE
((
uintptr_t
)
node
);
/*
* get information from the node
*/
...
...
src/backend/utils/probes.d
View file @
227f817c
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2006-2009, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/backend/utils/probes.d,v 1.
9 2009/03/23 01:52:38 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/utils/probes.d,v 1.
10 2009/04/02 19:14:34 momjian
Exp $
* ----------
*/
...
...
@@ -15,6 +15,7 @@
* in probe definitions, as they cause compilation errors on Mac OS X 10.5.
*/
#
define
LocalTransactionId
unsigned
int
#
define
TransactionId
unsigned
int
#
define
LWLockId
int
#
define
LWLockMode
int
#
define
LOCKMODE
int
...
...
@@ -90,4 +91,29 @@ provider postgresql {
probe
xlog__switch
();
probe
wal__buffer__write__dirty__start
();
probe
wal__buffer__write__dirty__done
();
probe
slru__readpage__start
(
unsigned
long
,
int
,
bool
,
TransactionId
);
probe
slru__readpage__done
(
int
);
probe
slru__readpage__readonly
(
unsigned
long
,
int
,
TransactionId
);
probe
slru__writepage__start
(
unsigned
long
,
int
,
int
);
probe
slru__writepage__done
();
probe
slru__readpage__physical__start
(
unsigned
long
,
char
*,
int
,
int
);
probe
slru__readpage__physical__done
(
int
,
int
,
int
);
probe
slru__writepage__physical__start
(
unsigned
long
,
int
,
int
);
probe
slru__writepage__physical__done
(
int
,
int
,
int
);
probe
executor__scan
(
unsigned
long
,
unsigned
int
,
unsigned
long
);
probe
executor__agg
(
unsigned
long
,
int
);
probe
executor__group
(
unsigned
long
,
int
);
probe
executor__hash__multi
(
unsigned
long
);
probe
executor__hashjoin
(
unsigned
long
);
probe
executor__limit
(
unsigned
long
);
probe
executor__material
(
unsigned
long
);
probe
executor__mergejoin
(
unsigned
long
);
probe
executor__nestloop
(
unsigned
long
);
probe
executor__setop
(
unsigned
long
);
probe
executor__sort
(
unsigned
long
,
int
);
probe
executor__subplan__hash
(
unsigned
long
);
probe
executor__subplan__scan
(
unsigned
long
);
probe
executor__unique
(
unsigned
long
);
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment