From: Joe Conway <mail@joeconway.com>
To: Scott Cain <cain@cshl.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: EXTERNAL storage and substring on long strings
Date: Thu, 31 Jul 2003 14:03:05 -0700
Message-ID: <3F298409.4030309@joeconway.com> (raw)
In-Reply-To: <1059682839.5415.53.camel@localhost.localdomain>
References: <1059679600.1429.41.camel@localhost.localdomain>
<18305.1059680697@sss.pgh.pa.us>
<1059682839.5415.53.camel@localhost.localdomain>
Scott Cain wrote:
> I am not against recompiling. I am currently using an RPM version, but
> I could probably recompile; the compilation is probably straight forward
> (adding something like `--with_profiling` to ./configure), but how
> straight forward is actually doing the profiling? Is there a document
> somewhere that lays it out?
>
Try:
rpm --rebuild --define 'beta 1' postgresql-7.3.4-1PGDG.src.rpm
This will get you Postgres with --enable-cassert and --enable-debug, and
it will leave the binaries unstripped. Install the new RPMs.
Then start up psql in one terminal, followed by gdb in another. Attach
to the postgres backend pid and set a breakpoint at
toast_fetch_datum_slice. Then continue the gdb session, and run your sql
statement in the psql session. Something like:
session 1:
psql mydatabase
session 2:
ps -ef | grep postgres
(note the pid on the postgres backend, *not* the psql session)
gdb /usr/bin/postgres
attach <pid-of-backend>
break toast_fetch_datum_slice
continue
session 1:
select substring(residues from 1000000 for 20000) from feature where
feature_id=1;
session 2:
did we hit the breakpoint in toast_fetch_datum_slice?
HTH,
Joe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mail@joeconway.com, cain@cshl.org, tgl@sss.pgh.pa.us, pgsql-performance@postgresql.org
Subject: Re: EXTERNAL storage and substring on long strings
In-Reply-To: <3F298409.4030309@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox