.\" ----------
.\" figure-1
.\"
.\"	Copyright (c) 2003-2009, PostgreSQL Global Development Group
.\"	Author: Jan Wieck, Afilias USA INC.
.\"
.\" 
.\" ----------
.PS
.ps -2
.vs 1m

dx=0.4

Outer:	box wid 5.2 ht 4.2
		"Figure 1" at Outer.s below
.ps -4

define table {
		box wid 0.8 ht 0.15
		" \fB$1\fR" at last box .w ljust
}

define field {
F$1:	box same with .n at last box .s
		" $1" at last box .w ljust
		"$2 " at last box .e rjust
}

Tsl_node: [
		table(sl_node)
		field(no_id, PK)
		field(no_active)
		field(no_comment)
	] with .nw at Outer.nw+(1.6,-1.5)

Tsl_set: [
		table(sl_set)
		field(set_id, PK)
		field(set_origin)
		field(set_comment)
	] with .nw at Tsl_node.ne+(dx,0.0)

	line -> from Tsl_set.Fset_origin.w left 0.2 then up 0.15 to Tsl_node.Fno_id.e

Tsl_setsync: [
		table(sl_setsync)
		field(ssy_setid, PK)
		field(ssy_origin)
		field(ssy_seqno)
		field(ssy_minxid)
		field(ssy_maxxid)
		field(ssy_xip)
		field(ssy_action_list)
	] with .nw at Tsl_set.sw+(0.0,-dx)

	line -> from Tsl_setsync.Fssy_setid.e right 0.2 to Tsl_set.Fset_id.e+(0.2,0.0) to Tsl_set.Fset_id.e
	line -> from Tsl_setsync.Fssy_origin.w left 0.2 to Tsl_node.Fno_id.e+(0.2,0.0) to Tsl_node.Fno_id.e

Tsl_table: [
		table(sl_table)
		field(tab_id, PK)
		field(tab_reloid)
		field(tab_set)
		field(tab_attkind)
		field(tab_comment)
	] with .nw at Tsl_set.ne+(dx,0.0)

	line -> from Tsl_table.Ftab_set.w left 0.2 then up 0.3 to Tsl_set.Fset_id.e

Tsl_path: [
		table(sl_path)
		field(pa_server, PK1)
		field(pa_client, PK2)
		field(pa_conninfo)
		field(pa_connretry)
	] with .sw at Tsl_node.nw+(0.0,dx)

	line -> from Tsl_path.Fpa_server.e right 0.2 to Tsl_node.Fno_id.e+(0.2,0.0) to Tsl_node.Fno_id.e
	line -> from Tsl_path.Fpa_client.e right 0.2 to Tsl_node.Fno_id.e+(0.2,0.0) to Tsl_node.Fno_id.e

Tsl_listen: [
		table(sl_listen)
		field(li_origin, PK1)
		field(li_provider, PK2)
		field(li_receiver, PK3)
	] with .ne at Tsl_path.nw+(-dx,0.0)

	line -> from Tsl_listen.Fli_origin.w left 0.2 then down 0.5 then right 1.2 to Tsl_node.Fno_id.w+(-0.2,0.0) to Tsl_node.Fno_id.w

	line    from Tsl_listen.Fli_provider.e right 0.1 then down 0.075
	line    from Tsl_listen.Fli_receiver.e right 0.1 then up 0.075
	circle	rad 0.02 fill 1.0 with .c at Tsl_listen.Fli_provider.se+(0.1,0.0)
	line	from Tsl_listen.Fli_provider.se+(0.1,0.0) right 0.1 to Tsl_path.Fpa_server.sw+(-0.2,0.0) then right 0.1
	circle	rad 0.02 fill 1.0 with .c at Tsl_path.Fpa_server.sw+(-0.1,0.0)
	line -> from Tsl_path.Fpa_server.sw+(-0.1,0.0) up 0.075 to Tsl_path.Fpa_server.w
	line -> from Tsl_path.Fpa_server.sw+(-0.1,0.0) down 0.075 to Tsl_path.Fpa_client.w

Tsl_subscribe: [
		table(sl_subscribe)
		field(sub_set, PK2)
		field(sub_provider)
		field(sub_receiver, PK1)
		field(sub_forward)
		field(sub_active)
	] with .nw at Tsl_path.ne+(dx,0.0)

	line -> from Tsl_subscribe.Fsub_set.e right 0.2 to Tsl_set.Fset_id.e+(0.2,0.0) to Tsl_set.Fset_id.e

.\" multi-colum constraint sl_subscribe-sl_path-ref
	line    from Tsl_subscribe.Fsub_provider.w left 0.1
	line    from Tsl_subscribe.Fsub_receiver.w left 0.1 then up 0.15
	circle	rad 0.02 fill 1.0 with .c at Tsl_subscribe.Fsub_provider.w+(-0.1,0.0)
	line    from Tsl_subscribe.Fsub_provider.w+(-0.1,0.0) up 0.5 then left 1.3 to Tsl_path.Fpa_server.sw+(-0.2,0.0) then right 0.1

Tsl_event: [
		table(sl_event)
		field(ev_origin, PK1)
		field(ev_seqno, PK2)
		field(ev_timestamp)
		field(ev_minxid)
		field(ev_maxxid)
		field(ev_xip)
		field(ev_type)
		field(ev_data1)
		field(ev_data2)
		field(ev_data3)
		field(ev_data4)
		field(ev_data5)
		field(ev_data6)
		field(ev_data7)
		field(ev_data8)
	] with .ne at Tsl_node.nw+(-dx,0.0)

	line -> from Tsl_event.Fev_origin.e to Tsl_node.Fno_id.w

Tsl_confirm: [
		table(sl_confirm)
		field(con_origin)
		field(con_received)
		field(con_seqno)
		field(con_timestamp)
	] with .nw at Tsl_node.sw+(0.0,-dx)

	line -> from Tsl_confirm.Fcon_origin.e right 0.2 to Tsl_node.Fno_id.e+(0.2,0.0) to Tsl_node.Fno_id.e
	line -> from Tsl_confirm.Fcon_received.e right 0.2 to Tsl_node.Fno_id.e+(0.2,0.0) to Tsl_node.Fno_id.e

Tsl_logs: [
		table(sl_log_[1|2])
		field(sl_origin)
		field(sl_xid)
		field(sl_tableid)
		field(sl_actionseq)
		field(sl_cmdtype)
		field(sl_cmddata)
	] with .sw at Tsl_table.w.x,Tsl_event.se.y
.ps -6
.vs
.PE
