Hannu Krosing hannu
Wed Sep 28 14:16:08 PDT 2005
On T, 2005-09-27 at 17:35 -0500, Joe Markwardt wrote:
> On Wed, 2005-09-28 at 01:20 +0300, Hannu Krosing wrote:
> > On T, 2005-09-27 at 16:37 -0500, Joe Markwardt wrote:
> > 
> > > Yep.  And I restarted the slon's as well, so they should be using the
> > > index as long as the planner thinks it will help.  Is there anyway I can
> > > see the query that slon is generating to create the cursor? If I could
> > > see that query then I could do some explain analyze's and see what they
> > > say...
> > 
> > I usually look at the queries in postgres log.
> > 
> > In your case you could set up postgres to log only long queries, say
> > over 50 sec, and then just tail -f the log.
> > 
> > When analysing take notice that slon specially sets enable_seqsnam and
> > enable_indexscan before running the query on sl_log_1.
> > 
> Thanks for the tip, but the only queries that are being logged are the
> FETCH statements...I suppose I could set it up to log all queries (and
> plans) and then restart slon, then turn off the query logging.

In that case you have to log all queries and find the last one before
the fetch with the same pid

fortunately logging is changed by "pg_ctl reload" so you dont need to
restart the database to change logging, and thus can turn on logging all
queries for a small time (say 3 min) only.

-- 
Hannu Krosing <hannu at skype.net>



More information about the Slony1-general mailing list