Home > Archive > Slony1 PostgreSQL Replication > August 2005 > Re: query too complex after subscribing a set









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: query too complex after subscribing a set
Hannu Krosing

2005-08-10, 7:25 am

On T, 2005-08-09 at 14:35 -0400, Christopher Browne wrote:
> Hannu Krosing wrote:


> Oh, yeah, that was on my "to do" list, and got lost :-(
>
> I ran into the same problem when too much time passed between (I think)
> submitting SUBSCRIBE SET and then starting the slon for the subscriber.
>
> The big part of the query is the "and log_actionseq not in (... ENORMOUS
> LIST ...)" part, right?


I guess so.

> Time to look into finding a way to compress that... (What I'm thinking
> of doing is to have that clause combine adjacent values together...)


Either this, or just create a temp table and then 'COPY FROM STDIN +
create index' and use join instead of IN () if there are more members in
list than some predefined number.

I attached python pseudocode for doing the conversions from NOT IN to
AND-list of != and NOT BETWEEN
When I tried the attached code on my failing query and it converted
alist of 160035 ints to just one BETWEEN.

> I think you're a bit out of luck on this particular subscription.


Fortunately doing what was suggested in the error message (HINT:
Increase the configuration parameter "max_expr_depth".) helped me out
this time. i upped it to 50k from default 10k.

But I think cant't raise this indefinitely :(expr_d)

> What you might try when you restart it is to, during the subscription
> period, bump up the amount of time per SYNC (e.g. - increase -s and -t
> intervals) so that there aren't so many outstanding SYNCs when the
> subscription gets going.


what does "log_actionseq not in (..." exactly check for ?

--
Hannu Krosing <hannu-7C/ iILuz2RdeoWH0uzbU5w@
public.gmane.org>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com