Justin Clift jc
Thu Jul 29 03:46:22 PDT 2004
Hi all,

This is the first go at documenting how Slony stores stuff internally in 
each table, the purpose of each table, and so on.

Needs a lot more fleshing out, but it should be a useful start.

Regards and best wishes,

Justin Clift
-------------- next part --------------
The Tables used by Slony for storing its information are:

sl_config_lock
++++++++++++++

	dummy			:	Integer


sl_confirm
++++++++++

	Holds confirmation of replication events.

	After a period of time, Slony removes old confirmed events from both this table and the sl_event table.

	con_origin		:	Integer.  The ID # (from sl_node.no_id) of the source node for this event  
	con_received	:	Integer.
	con_seqno		:	Integer.  The ID # for the event
	con_timestamp	:	Timestamp.  When this event was confirmed


sl_event
++++++++

	Holds information about replication events.

	After a period of time, Slony removes old confirmed events from both this table and the sl_confirm table.

	ev_origin		:	Integer.  The ID # (from sl_node.no_id) of the source node for this event
	ev_seqno		:	Integer.  The ID # for the event
	ev_timestamp	:	Timestamp.  When this event record was created
	ev_minxid		:
	ev_maxxid		:
	ev_xip			:	String.
	ev_type			:	String.  The type of event this record is for.

						SYNC				= Syncronise
						STORE_NODE			=
						ENABLE_NODE			=
						DROP_NODE			=
						STORE_PATH			=
						DROP_PATH			=
						STORE_LISTEN		=
						DROP_LISTEN			=
						STORE_SET			=
						DROP_SET			=
						MERGE_SET			=
						SET_ADD_TABLE		=
						SET_ADD_SEQUENCE	=
						STORE_TRIGGER		=
						DROP_TRIGGER		=
						MOVE_SET			=
						FAILOVER_SET		=
						SUBSCRIBE_SET		=
						ENABLE_SUBSCRIPTION	=
						UNSUBSCRIBE_SET		=
						DDL_SCRIPT			=
						ADJUST_SEQ			=

	ev_data1		:	String.
	ev_data2		:	String.
	ev_data3		:	String.
	ev_data4		:	String.
	ev_data5		:	String.
	ev_data6		:	String.
	ev_data7		:	String.
	ev_data8		:	String.


sl_listen
+++++++++

	li_origin		:	Integer.  The ID # (from sl_node.no_id) of the node this listener is operating on
	li_provider		:	Integer.  The ID # (from sl_node.no_id) of the source node for this listening event
	li_receiver		:	Integer.  The ID # (from sl_node.no_id) of the target node for this listening event


sl_log_1
++++++++

	log_origin		:	Integer.
	log_xid			:	
	log_tableid		:	Integer.  The replicated table ID # (from sl_table.tab_id) this log entry is for
	log_actionseq	:	Integer.
	log_cmdtype		:	Char.  The replication action to take.  U = Update, I = Insert, D = DELETE
	log_cmddata		:	String.  The data needed to perform the log action


sl_log_2
++++++++

	log_origin		:	Integer.
	log_xid			:	
	log_tableid		:	Integer.  The replicated table ID # (from sl_table.tab_id) this log entry is for
	log_actionseq	:	Integer.
	log_cmdtype		:	Char.  The replication action to take.  U = Update, I = Insert, D = DELETE
	log_cmddata		:	String.  The data needed to perform the log action


sl_node
+++++++

	no_id			:	Integer.  Unique ID # for the node
	no_active		:	Boolean.
	no_comment		:	String.  Human oriented description of the node


sl_path
+++++++

	Holds connection information for the paths between nodes, and the syncronisation delay

	pa_server		:	Integer.  The Node ID # (from sl_node.no_id) of the data source
	pa_client		:	Integer.  The Node ID # (from sl_node.no_id) of the data target
	pa_conninfo		:	String.  The PostgreSQL connection string used to connect to the source node.
	pa_connretry	:	Integer.  The syncronisation delay, in seconds
	

sl_seqlog
+++++++++

	seql_seqid		:	Integer.
	seql_origin		:	Integer.
	seql_ev_seqno	:	Integer.  The ID # of the replication event
	seql_last_value	:	Integer.


sl_sequence
+++++++++++

	seq_id			:	Integer.
	seq_reloid		:	Integer.
	seq_set			:	Integer.
	seq_comment		:	String.


sl_set
++++++

	Holds definitions of replication sets.

	set_id			:	Integer.  Unique ID # for the set
	set_origin		:	Integer.  ID # (from sl_node.no_id) of the source node for the replication set
	set_locked		:	
	set_comment		:	String.  Human oriented description of the set


sl_setsync
++++++++++

	ssy_setid		:	Integer.
	ssy_origin		:	Integer.
	ssy_seqno		:	Integer.
	ssy_minxid		:
	ssy_maxxid		:
	ssy_xip			:	String.
	ssy_action_list	:	String.


sl_subscribe
++++++++++++

	sub_set			:	Integer.
	sub_provider	:	Integer.
	sub_receiver	:	Integer.
	sub_forward		:	Boolean.
	sub_active		:	Boolean.	


sl_table
++++++++

	Holds information about the tables being replicated.

	tab_id			:	Integer.
	tab_reloid		:	Integer.  The OID of the table in pg_catalog.pg_class.oid
	tab_set			:	Integer.
	tab_idxname		:	String.  The name of the primary index of the table
	tab_altered 	:	Boolean.
	tab_comment		:	String.  Human oriented description of the table


sl_trigger
++++++++++

	trig_tabid		:	Integer.
	trig_tgname		:	String.



More information about the Slony1-general mailing list