Ed L. pgsql
Thu Sep 23 01:19:53 PDT 2004
On Wednesday September 22 2004 4:10, Christopher Browne wrote:
> "Ed L." <pgsql at bluepolka.net> writes:
> > I see that sl_log_1 "stores each change to be propagated to
> > subscriber nodes."  Can anyone explain the purpose of sl_log_1
> > vs. sl_log_2?  Looking at the source, it appears the same data is
> > inserted into both.
>
> Eventually the plan is for the triggers to insert data into either or
> the other, which means that we're "free" do maintenance on the table
> not presently in use.
>
> Thus, if we're adding new entries into sl_log_2, then it's OK for a
> work process to, at some point, TRUNCATE sl_log_1, which is way
> cheaper than doing a DELETE on the entries in the table.  That would
> also likely eliminate the need to vacuum the tables, which is probably
> also a win...

Hmm.  Adding 2 inserts for every update/delete/insert done by our 
applications would not be good for our performance.  Would you slony folks 
consider a patch that made this dual-insert approach optional?  Or maybe 
consider making it optional yourselves?  Seems particularly wasteful now if 
its not even being used.

Ed



More information about the Slony1-general mailing list