Skip site navigation (1) Skip section navigation (2)

Re: EXTERNAL storage and substring on long strings

From: Joe Conway <mail(at)joeconway(dot)com>
To: Scott Cain <cain(at)cshl(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: EXTERNAL storage and substring on long strings
Date: 2003-07-31 21:03:05
Message-ID: 3F298409.4030309@joeconway.com (view raw or flat)
Thread:
Lists: pgsql-performancepgsql-sql
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


In response to

pgsql-performance by date

Next:From: Tom LaneDate: 2003-07-31 21:10:22
Subject: Re: Odd performance results
Previous:From: Andrew SullivanDate: 2003-07-31 20:59:21
Subject: Re: Odd explain estimate

pgsql-sql by date

Next:From: Scott CainDate: 2003-07-31 21:11:15
Subject: Re: EXTERNAL storage and substring on long strings
Previous:From: Tom LaneDate: 2003-07-31 20:58:11
Subject: Re: EXTERNAL storage and substring on long strings

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group