Hi,
I managed to install postgresql10-debuginfo:
[root@kvrh7os202 /]# yum install -y postgresql10-debuginfo.x86_64
Executed perf-record and perf-report:
-bash-4.2$ perf record -g -- psql -U sri sri < /var/lib/pgsql/10/data/pg_log/1-b10/query.txt
< ... snipped ... >
Planning time: 1817.355 ms
Execution time: 31.849 ms
(480 rows)
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.025 MB perf.data (136 samples) ]
-bash-4.2$
-bash-4.2$ perf report -g > perf_report_20181105_1452.out
Please refer to the attached for the perf report output (not sure if it was done correctly).
Regards,
Richard Lee
On Mon, Nov 5, 2018 at 12:10 PM Justin Pryzby <pryzby@xxxxxxxxxxxxx> wrote:
On Mon, Nov 05, 2018 at 11:36:46AM +0800, Richard Lee wrote:
> Hi,
>
> Debug symbols can only be enabled during configure? How about when
> Postgresql is running?
If you're running from RPMs (maybe from yum.postgresql.org), you can install
postgresql10-debuginfo (maybe using: "debuginfo-install postgresql10").
Just be sure it installs the debuginfo for exactly the same RPM (rather than
installing a new minor version, for example).
If you compiled it yourself, you can probably point GDB to the un-stripped
binaries. Again, assuming you have binaries from exactly the same source
version, no additional patches, etc.
Justin
Attachment:
perf_report_20181105_1452.out
Description: Binary data