Dane Miller dane at greatschools.net
Thu Jun 12 11:39:41 PDT 2008
Geoffrey wrote:
> I can't seem to figure out what 'mechanism' actually causes replication. 
>   That may be a too simplistic view of the whole process, but the bottom 
> line is, I have to make sure that our manipulation of the 
> 'session_replication_role' is going to properly address the issue of 
> insuring slony continues to replicate our data.

During my own slony learning process (which is ongoing) I tried to spell
out the precise mechanisms of slony replication in the following post
from Nov 2007:

http://article.gmane.org/gmane.comp.db.postgresql.slony1.general/5532

To quote myself:

> Do I get the gist of it here?  If not, could someone be so kind as to correct me?
> 
> Tracing an insert from the origin to a subscriber (2 node cluster)
> 
> 1. INSERT into the origin
> 2. AFTER ROW trigger executes logtrigger which inserts into sl_log_{1,2}
> 3. origin's slon checks sl_log_{1,2}, inserts event into sl_event, generates NOTIFY
> 4. subscriber receives NOTIFY, inserts event into its sl_event table, inserts confirmation into its
> local sl_confirm table.
> 5. subscriber inserts event into origin's sl_confirm table
> 6. subscriber queries origin's sl_log_{1,2} using event info
> 7. Subscriber applies result of #6 to its local tables.


I get the feeling this isn't the whole picture.  Specifically missing
are SYNCs and sequence handling.  But perhaps this is still helpful to
list-goers.

Dane
-- 
Dane Miller
Systems Administrator
Greatschools, Inc
http://www.greatschools.net



More information about the Slony1-general mailing list