Slony-I 2.1.4 Documentation

Slony-I 2.1.4 Documentation

The PostgreSQL Global Development Group

Christopher Browne


Table of Contents
1. Preface
1.1. Introduction to Slony-I
1.2. System Requirements
1.3. Slony-I Concepts
1.4. Current Limitations
2. Tutorial
2.1. Replicating Your First Database
2.2. Starting & Stopping Replication
3. Administration Tasks
3.1. Slony-I Building & Installation
3.2. Modifying Things in a Replication Cluster
3.3. Database Schema Changes (DDL)
3.4. Doing switchover and failover with Slony-I
4. Advanced Concepts
4.1. Events & Confirmations
4.2. Slony-I Listen Paths
4.3. Slony-I Trigger Handling
4.4. Locking Issues
4.5. Log Shipping - Slony-I with Files
5. Deployment Considerations
5.1. Cluster Monitoring
5.2. Component Monitoring
5.3. Partitioning Support
5.4. Slony-I Upgrade
5.5. Log Analysis
5.6. Performance Considerations
5.7. Security Considerations
6. Additional Utilities
6.1. Slony-I Administration Scripts
6.2. Slony-I Watchdog
6.3. Testing Slony-I State
6.4. Log Files
6.5. mkservice
6.6. Slony-I Test Suites
6.7. Clustertest Test Framework
6.8. Slony-I Test Bed Framework
I. Reference
slon --  Slony-I daemon
slonik --  Slony-I command processor
I. Slonik Meta Commands
II. Slonik Preamble Commands
III. Configuration and Action commmands
7. Appendix
7.1. Frequently Asked Questions
7.2. Release Checklist
7.3. Using Slonik
7.4. Embedding Slonik in Shell Scripts
7.5. More Slony-I Help
8. Schema schemadoc
8.1. Table: sl_archive_counter
8.2. Table: sl_components
8.3. Table: sl_config_lock
8.4. Table: sl_confirm
8.5. Table: sl_event
8.6. Table: sl_event_lock
8.7. Table: sl_listen
8.8. Table: sl_log_1
8.9. Table: sl_log_2
8.10. Table: sl_node
8.11. Table: sl_nodelock
8.12. Table: sl_path
8.13. Table: sl_registry
8.14. View: sl_seqlastvalue
8.15. Table: sl_seqlog
8.16. Table: sl_sequence
8.17. Table: sl_set
8.18. Table: sl_setsync
8.19. Table: sl_subscribe
8.20. Table: sl_table
8.21. add_empty_table_to_replication(p_comment integer, p_idxname integer, p_tabname text, p_nspname text, p_tab_id text, p_set_id text)
8.22. add_missing_table_field(p_type text, p_field text, p_table text, p_namespace text)
8.23. addpartiallogindices()
8.24. altertableaddtriggers(p_tab_id integer)
8.25. altertableconfiguretriggers(p_tab_id integer)
8.26. altertabledroptriggers(p_tab_id integer)
8.27. checkmoduleversion()
8.28. cleanupevent(p_interval interval)
8.29. cleanupnodelock()
8.30. clonenodefinish(p_no_provider integer, p_no_id integer)
8.31. clonenodeprepare(p_no_comment integer, p_no_provider integer, p_no_id text)
8.32. clonenodeprepare_int(p_no_comment integer, p_no_provider integer, p_no_id text)
8.33. component_state(i_eventtype text, i_event integer, i_starttime integer, i_activity integer, i_conn_pid text, i_node timestamp with time zone, i_pid bigint, i_actor text)
8.34. copyfields(p_tab_id integer)
8.35. createevent(ev_data1 name, p_event_type text, p_cluster_name text)
8.36. createevent(ev_data2 name, ev_data1 text, p_event_type text, p_cluster_name text)
8.37. createevent(ev_data3 name, ev_data2 text, ev_data1 text, p_event_type text, p_cluster_name text)
8.38. createevent(ev_data4 name, ev_data3 text, ev_data2 text, ev_data1 text, p_event_type text, p_cluster_name text)
8.39. createevent(ev_data5 name, ev_data4 text, ev_data3 text, ev_data2 text, ev_data1 text, p_event_type text, p_cluster_name text)
8.40. createevent(ev_data6 name, ev_data5 text, ev_data4 text, ev_data3 text, ev_data2 text, ev_data1 text, p_event_type text, p_cluster_name text)
8.41. createevent(ev_data7 name, ev_data6 text, ev_data5 text, ev_data4 text, ev_data3 text, ev_data2 text, ev_data1 text, p_event_type text, p_cluster_name text)
8.42. createevent(ev_data8 name, ev_data7 text, ev_data6 text, ev_data5 text, ev_data4 text, ev_data3 text, ev_data2 text, ev_data1 text, p_event_type text, p_cluster_name text)
8.43. createevent(p_event_type name, p_cluster_name text)
8.44. ddlscript_complete(p_only_on_node integer, p_script text, p_set_id integer)
8.45. ddlscript_complete_int(p_only_on_node integer, p_set_id integer)
8.46. ddlscript_prepare(p_only_on_node integer, p_set_id integer)
8.47. ddlscript_prepare_int(p_only_on_node integer, p_set_id integer)
8.48. decode_tgargs(bytea)
8.49. deny_truncate()
8.50. denyaccess()
8.51. determineattkindunique(p_idx_name text, p_tab_fqname name)
8.52. determineidxnameunique(p_idx_name text, p_tab_fqname name)
8.53. disable_indexes_on_table(i_oid oid)
8.54. disablenode(p_no_id integer)
8.55. disablenode_int(p_no_id integer)
8.56. droplisten(p_li_receiver integer, p_li_provider integer, p_li_origin integer)
8.57. droplisten_int(p_li_receiver integer, p_li_provider integer, p_li_origin integer)
8.58. dropnode(p_no_id integer)
8.59. dropnode_int(p_no_id integer)
8.60. droppath(p_pa_client integer, p_pa_server integer)
8.61. droppath_int(p_pa_client integer, p_pa_server integer)
8.62. dropset(p_set_id integer)
8.63. dropset_int(p_set_id integer)
8.64. enable_indexes_on_table(i_oid oid)
8.65. enablenode(p_no_id integer)
8.66. enablenode_int(p_no_id integer)
8.67. enablesubscription(p_sub_receiver integer, p_sub_provider integer, p_sub_set integer)
8.68. enablesubscription_int(p_sub_receiver integer, p_sub_provider integer, p_sub_set integer)
8.69. failednode(p_backup_node integer, p_failed_node integer)
8.70. failednode2(p_ev_seqfake integer, p_ev_seqno integer, p_set_id integer, p_backup_node bigint, p_failed_node bigint)
8.71. failoverset_int(p_wait_seqno integer, p_set_id integer, p_backup_node integer, p_failed_node bigint)
8.72. finishtableaftercopy(p_tab_id integer)
8.73. forwardconfirm(p_con_timestamp integer, p_con_seqno integer, p_con_received bigint, p_con_origin timestamp without time zone)
8.74. generate_sync_event(p_interval interval)
8.75. getlocalnodeid(p_cluster name)
8.76. getmoduleversion()
8.77. initializelocalnode(p_comment integer, p_local_node_id text)
8.78. is_node_reachable(receiver_node_id integer, origin_node_id integer)
8.79. issubscriptioninprogress(p_add_id integer)
8.80. killbackend(p_signame integer, p_pid text)
8.81. lockedset()
8.82. lockset(p_set_id integer)
8.83. log_truncate()
8.84. logswitch_finish()
8.85. logswitch_start()
8.86. logtrigger()
8.87. mergeset(p_add_id integer, p_set_id integer)
8.88. mergeset_int(p_add_id integer, p_set_id integer)
8.89. moveset(p_new_origin integer, p_set_id integer)
8.90. moveset_int(p_wait_seqno integer, p_new_origin integer, p_old_origin integer, p_set_id bigint)
8.91. preparetableforcopy(p_tab_id integer)
8.92. rebuildlistenentries()
8.93. recreate_log_trigger(p_tab_attkind text, p_tab_id oid, p_fq_table_name text)
8.94. registernodeconnection(p_nodeid integer)
8.95. registry_get_int4(p_default text, p_key integer)
8.96. registry_get_text(p_default text, p_key text)
8.97. registry_get_timestamp(p_default text, p_key timestamp with time zone)
8.98. registry_set_int4(p_value text, p_key integer)
8.99. registry_set_text(p_value text, p_key text)
8.100. registry_set_timestamp(p_value text, p_key timestamp with time zone)
8.101. repair_log_triggers(only_locked boolean)
8.102. replicate_partition(p_comment integer, p_idxname text, p_tabname text, p_nspname text, p_tab_id text)
8.103. resetsession()
8.104. reshapesubscription(p_sub_receiver integer, p_sub_provider integer, p_sub_set integer)
8.105. seqtrack(p_seqval integer, p_seqid bigint)
8.106. sequencelastvalue(p_seqname text)
8.107. sequencesetvalue(p_last_value integer, p_ev_seqno integer, p_seq_origin bigint, p_seq_id bigint)
8.108. setaddsequence(p_seq_comment integer, p_fqname integer, p_seq_id text, p_set_id text)
8.109. setaddsequence_int(p_seq_comment integer, p_fqname integer, p_seq_id text, p_set_id text)
8.110. setaddtable(p_tab_comment integer, p_tab_idxname integer, p_fqname text, p_tab_id name, p_set_id text)
8.111. setaddtable_int(p_tab_comment integer, p_tab_idxname integer, p_fqname text, p_tab_id name, p_set_id text)
8.112. setdropsequence(p_seq_id integer)
8.113. setdropsequence_int(p_seq_id integer)
8.114. setdroptable(p_tab_id integer)
8.115. setdroptable_int(p_tab_id integer)
8.116. setmovesequence(p_new_set_id integer, p_seq_id integer)
8.117. setmovesequence_int(p_new_set_id integer, p_seq_id integer)
8.118. setmovetable(p_new_set_id integer, p_tab_id integer)
8.119. setmovetable_int(p_new_set_id integer, p_tab_id integer)
8.120. slon_node_health_check()
8.121. slon_quote_brute(p_tab_fqname text)
8.122. slon_quote_input(p_tab_fqname text)
8.123. slonyversion()
8.124. slonyversionmajor()
8.125. slonyversionminor()
8.126. slonyversionpatchlevel()
8.127. store_application_name(i_name text)
8.128. storelisten(p_receiver integer, p_provider integer, p_origin integer)
8.129. storelisten_int(p_li_receiver integer, p_li_provider integer, p_li_origin integer)
8.130. storenode(p_no_comment integer, p_no_id text)
8.131. storenode_int(p_no_comment integer, p_no_id text)
8.132. storepath(p_pa_connretry integer, p_pa_conninfo integer, p_pa_client text, p_pa_server integer)
8.133. storepath_int(p_pa_connretry integer, p_pa_conninfo integer, p_pa_client text, p_pa_server integer)
8.134. storeset(p_set_comment integer, p_set_id text)
8.135. storeset_int(p_set_comment integer, p_set_origin integer, p_set_id text)
8.136. subscribeset(p_omit_copy integer, p_sub_forward integer, p_sub_receiver integer, p_sub_provider boolean, p_sub_set boolean)
8.137. subscribeset_int(p_omit_copy integer, p_sub_forward integer, p_sub_receiver integer, p_sub_provider boolean, p_sub_set boolean)
8.138. tablestovacuum()
8.139. terminatenodeconnections(p_failed_node integer)
8.140. uninstallnode()
8.141. unlockset(p_set_id integer)
8.142. unsubscribeset(p_sub_receiver integer, p_sub_set integer)
8.143. unsubscribeset_int(p_sub_receiver integer, p_sub_set integer)
8.144. updaterelname(p_only_on_node integer, p_set_id integer)
8.145. updatereloid(p_only_on_node integer, p_set_id integer)
8.146. upgradeschema(p_old text)
Index
List of Tables
4-1. Trigger Behaviour