Rod Taylor wrote:
> Restarting slon for node 1 will clear all of the connections (takes some
> time as a result of the now very heavy contention over pg_listener).
>   
That's *very* interesting.

Two thoughts:

1.  You might consider shutting off the node 1 slon altogether, and
running generate_sync_event() once in a while from cron.

Note that this has been in Slony-I since about 1.0.5...

create or replace function @[EMAIL PROTECTED](interval)
returns int4
as '
declare
    p_interval     alias for $1;
    v_node_row     record;

BEGIN
    select 1 into v_node_row from @[EMAIL PROTECTED]
             where ev_type = ''SYNC'' and ev_origin =
@[EMAIL PROTECTED](''@NAMESPACE@'')
          and ev_timestamp > now() - p_interval limit 1;
    if not found then
        -- If there has been no SYNC in the last interval, then push one
        perform @[EMAIL PROTECTED](''@NAMESPACE@'', ''SYNC'', NULL);
        return 1;
    else
        return 0;
    end if;
end;
' language plpgsql;

The original intent was to have this in a crontab, and run it with
interval '5 minutes' so that if the origin node's slon falls over,
there's still a periodic SYNC.  If the slon is running, then you're
getting SYNCs more often than every 5 minutes, so this would do NOTHING.

2.  Significantly increase the sync_interval parameters

The default is to generate a SYNC (and attendant pg_listener churn) once
per second.

If you've got a subscriber that won't be processing SYNCs until 20h from
now, there's little point in generating 3600 SYNCs per hour.

Bump up sync_interval and sync_interval_timeout to, say, 60000, and
there will be just 1 SYNC (and killed-off pg_listener entries) once per
minute.  You should still have "bite-sized" SYNCs;  you're still getting
60/h.

Those strike me as changes that could be made in 1.1.5 (and earlier)
that would alleviate the problem.
> That's why I expect it to go away after Slony 1.2 is release -- no more
> pg_listener entries)

Yeah.

Happily, I haven't seen anything in this thread that points at there
being big things that need to be changed that *aren't* already in CVS
HEAD.  All of the issues appear to be resolved by changes that have been
made.

Next step, 1.2...
_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general

Reply via email to