Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit133d1e8

Browse files
committed
Collect the bits of wisdom about dtrace installation in the installation
chapter rather than scattering them across several incomplete fragments.
1 parent2f52d72 commit133d1e8

File tree

3 files changed

+28
-41
lines changed

3 files changed

+28
-41
lines changed

‎doc/FAQ_Solaris

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL
33
Sun Solaris specific
44
To be read in conjunction with the installation instructions.
55
============================================================
6-
Last updated: $Date: 2006/10/10 22:19:08 $
6+
Last updated: $Date: 2006/12/02 09:29:51 $
77

88

99
Contents:
@@ -142,18 +142,8 @@ recommendations are also useful on other hardware with Solaris.
142142

143143
8) Can I use DTrace for tracing PostgreSQL?
144144

145-
PostgreSQL 8.2 has implemented DTrace support. You can enable it by
146-
the --enable-dtrace configure switch. If you want to build 64-bit
147-
binaries with DTrace you must specify DTRACEFLAGS='-64', e.g.,
148-
149-
Using GCC compiler:
150-
151-
$ ./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
152-
153-
Using Sun compiler:
154-
155-
$ ./configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64'
156-
145+
Yes, see the chapter "Monitoring Database Activity" in the documentation
146+
for further information.
157147

158148
If you see the linking of the postgres executable abort with an error
159149
message like

‎doc/src/sgml/installation.sgml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.267 2006/12/01 21:17:51tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.268 2006/12/02 09:29:51petere Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -1039,6 +1039,19 @@ su - postgres
10391039
specified in the environment variable
10401040
<envar>DTRACEFLAGS</envar>.
10411041
</para>
1042+
1043+
<para>
1044+
To include DTrace support in a 64-bit binary, specify
1045+
<literal>DTRACEFLAGS="-64"</> to configure. For example,
1046+
using the GCC compiler:
1047+
<screen>
1048+
./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
1049+
</screen>
1050+
Using Sun's compiler:
1051+
<screen>
1052+
./configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64' ...
1053+
</screen>
1054+
</para>
10421055
</listitem>
10431056
</varlistentry>
10441057

‎doc/src/sgml/monitoring.sgml

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.40 2006/12/0200:42:54 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.41 2006/12/0209:29:51 petere Exp $ -->
22

33
<chapter id="monitoring">
44
<title>Monitoring Database Activity</title>
@@ -824,29 +824,14 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
824824
</para>
825825

826826
<sect2 id="compiling-for-trace">
827-
<title>Compiling for DynamicTrace</title>
827+
<title>Compiling for DynamicTracing</title>
828828

829829
<para>
830830
By default, trace points are disabled, so you will need to
831831
explicitly tell the configure script to make the probes available
832832
in <productname>PostgreSQL</productname>. To include DTrace support
833-
in a 32-bit binary, specify <option>--enable-dtrace</> to configure.
834-
For example:
835-
<programlisting>
836-
$ ./configure --enable-dtrace ...
837-
</programlisting>
838-
To include DTrace support in a 64-bit binary, specify
839-
<option>--enable-dtrace</>
840-
and <literal>DTRACEFLAGS="-64"</> to configure. For example,
841-
using the gcc compiler:
842-
<programlisting>
843-
$ ./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
844-
</programlisting>
845-
Using Sun's compiler:
846-
<programlisting>
847-
$ ./configure CC='/path_to_sun_compiler/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64' ...
848-
</programlisting>
849-
</para>
833+
specify <option>--enable-dtrace</> to configure. See <xref
834+
linkend="install-procedure"> for further information.
850835
</sect2>
851836

852837
<sect2 id="trace-points">
@@ -855,7 +840,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
855840
<para>
856841
A few standard trace points are provided in the source code
857842
(of course, more can be added as needed for a particular problem).
858-
These are:
843+
These are shown in <xref linkend="trace-point-table">.
859844
</para>
860845

861846
<table id="trace-point-table">
@@ -974,15 +959,14 @@ postgresql$1:::transaction-commit
974959
Note how the double underline in trace point names needs to
975960
be replaced by a hyphen when using D script.
976961
When executed, the example D script gives output such as:
977-
<programlisting>
962+
<screen>
978963
# ./txn_count.d `pgrep -n postgres`
979964
^C
980965

981966
Start 71
982967
Commit 70
983-
Abort 1
984968
Total time (ns) 2312105013
985-
</programlisting>
969+
</screen>
986970
</para>
987971
<para>
988972
You should remember that trace programs need to be carefully written and
@@ -999,7 +983,7 @@ Total time (ns) 2312105013
999983

1000984
<para>
1001985
New trace points can be defined within the code wherever the developer
1002-
desires, though this will require are-compile.
986+
desires, though this will require arecompilation.
1003987
</para>
1004988

1005989
<para>
@@ -1009,14 +993,14 @@ Total time (ns) 2312105013
1009993
occurrence of an event can be achieved with a single line, using
1010994
just the trace point name, e.g.
1011995
<programlisting>
1012-
PG_TRACE (my__new__trace__point);
996+
PG_TRACE (my__new__trace__point);
1013997
</programlisting>
1014998
More complex trace points can be provided with one or more variables
1015999
for inspection by the dynamic tracing utility by using the
10161000
<literal>PG_TRACE</><replaceable>n</> macro that corresponds to the number
10171001
of parameters after the trace point name:
10181002
<programlisting>
1019-
PG_TRACE3 (my__complex__event, varX, varY, varZ);
1003+
PG_TRACE3 (my__complex__event, varX, varY, varZ);
10201004
</programlisting>
10211005
The definition of the transaction__start trace point is shown below:
10221006
<programlisting>
@@ -1055,7 +1039,7 @@ provider postgresql {
10551039
</para>
10561040

10571041
<para>
1058-
You should take care that thedatatypes specified for the probe arguments
1042+
You should take care that thedata types specified for the probe arguments
10591043
match the datatypes of the variables used in the <literal>PG_TRACE</>
10601044
macro. This is not checked at compile time. You can check that your newly
10611045
added trace point is available by recompiling, then running the new binary,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp