Hannu Krosing hannu
Wed Aug 31 10:26:32 PDT 2005
On T, 2005-08-30 at 09:25 -0700, Darcy Buskermolen wrote:
> On Tuesday 30 August 2005 09:14, Hannu Krosing wrote:
> > Hi
> >
> > When I have three nodes with a set from A being replicated so
> >
> > A --> B --> C
> >
> > When are log records deleted from sl_log_1 on node A ?
> >
> > Is it when they are copied to B or when they are copied to C ?
> >
> > I have had times when node C is slow, and it seems the the records are
> > not deleted from sl_log_1 on A in this case. I this true ?
> 
> yes this is correct.  this is done so that when B fails you can tell C it's 
> new origin of A and you don;t loose any data in the process.

Makes sense. Thanks!

The problem is, that I installed B with sole purpose of offloading
expensive queries from A. Unfortunately slon generates queries which do
a seqscan over sl_log_1 if more than one set originate from A (actually
it is even worse - the queries do and *indexscan* using the index'es
first column, which is constant in  my case), and it starts to take tens
of seconds once the sl_log_1 table has more than a few hundred thousand
rows, keeping the cpu usage at constant 100%.

Ok, I just have to fix the way slon generates the queries for several
sets. I took a brief look and it seems possible to do by rearranging
code and queries around line 3800 in remote_worker.c. ( The syncs are
done per node not per set, but they are used as if they were done per
set ).

And in the meantime use one cluster per set :P so that the query can use
the index.

-- 
Hannu Krosing <hannu at skype.net>



More information about the Slony1-general mailing list