Slony-I 2.2.10 Documentation

Slony-I 2.2.10 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 commands
slony_logshipping -- slony_logshippping daemon
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_apply_stats
8.2. Table: sl_archive_counter
8.3. Table: sl_components
8.4. Table: sl_config_lock
8.5. Table: sl_confirm
8.6. Table: sl_event
8.7. Table: sl_event_lock
8.8. View: sl_failover_targets
8.9. Table: sl_listen
8.10. Table: sl_log_1
8.11. Table: sl_log_2
8.12. Table: sl_log_script
8.13. Table: sl_node
8.14. Table: sl_nodelock
8.15. Table: sl_path
8.16. Table: sl_registry
8.17. View: sl_seqlastvalue
8.18. Table: sl_seqlog
8.19. Table: sl_sequence
8.20. Table: sl_set
8.21. Table: sl_setsync
8.22. Table: sl_subscribe
8.23. Table: sl_table
8.24. 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.25. add_missing_table_field(p_type text, p_field text, p_table text, p_namespace text)
8.26. addpartiallogindices()
8.27. agg_text_sum(txt_new text, txt_before text)
8.28. altertableaddtriggers(p_tab_id integer)
8.29. altertableconfiguretriggers(p_tab_id integer)
8.30. altertabledroptriggers(p_tab_id integer)
8.31. check_table_field_exists(p_field text, p_table text, p_namespace text)
8.32. check_unconfirmed_log()
8.33. checkmoduleversion()
8.34. cleanupevent(p_interval interval)
8.35. cleanupnodelock()
8.36. clonenodefinish(p_no_provider integer, p_no_id integer)
8.37. clonenodeprepare(p_no_comment integer, p_no_provider integer, p_no_id text)
8.38. clonenodeprepare_int(p_no_comment integer, p_no_provider integer, p_no_id text)
8.39. 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.40. copyfields(p_tab_id integer)
8.41. ddlcapture(p_nodes text, p_statement text)
8.42. ddlscript_complete(p_nodes text)
8.43. ddlscript_complete_int()
8.44. deny_truncate()
8.45. determineattkindunique(p_idx_name text, p_tab_fqname name)
8.46. determineidxnameunique(p_idx_name text, p_tab_fqname name)
8.47. disable_indexes_on_table(i_oid oid)
8.48. disablenode(p_no_id integer)
8.49. disablenode_int(p_no_id integer)
8.50. droplisten(p_li_receiver integer, p_li_provider integer, p_li_origin integer)
8.51. droplisten_int(p_li_receiver integer, p_li_provider integer, p_li_origin integer)
8.52. dropnode(p_no_ids integer[])
8.53. dropnode_int(p_no_id integer)
8.54. droppath(p_pa_client integer, p_pa_server integer)
8.55. droppath_int(p_pa_client integer, p_pa_server integer)
8.56. dropset(p_set_id integer)
8.57. dropset_int(p_set_id integer)
8.58. enable_indexes_on_table(i_oid oid)
8.59. enablenode(p_no_id integer)
8.60. enablenode_int(p_no_id integer)
8.61. enablesubscription(p_sub_receiver integer, p_sub_provider integer, p_sub_set integer)
8.62. enablesubscription_int(p_sub_receiver integer, p_sub_provider integer, p_sub_set integer)
8.63. failednode(p_failed_nodes integer, p_backup_node integer, p_failed_node integer[])
8.64. failednode2(p_failed_nodes integer, p_ev_seqno integer, p_backup_node bigint, p_failed_node integer[])
8.65. failednode3(p_seq_no integer, p_backup_node integer, p_failed_node bigint)
8.66. failoverset_int(p_last_seqno integer, p_backup_node integer, p_failed_node bigint)
8.67. finishtableaftercopy(p_tab_id integer)
8.68. forwardconfirm(p_con_timestamp integer, p_con_seqno integer, p_con_received bigint, p_con_origin timestamp without time zone)
8.69. generate_sync_event(p_interval interval)
8.70. initializelocalnode(p_comment integer, p_local_node_id text)
8.71. is_node_reachable(receiver_node_id integer, origin_node_id integer)
8.72. issubscriptioninprogress(p_add_id integer)
8.73. lockset(p_set_id integer)
8.74. log_truncate()
8.75. logswitch_finish()
8.76. logswitch_start()
8.77. mergeset(p_add_id integer, p_set_id integer)
8.78. mergeset_int(p_add_id integer, p_set_id integer)
8.79. moveset(p_new_origin integer, p_set_id integer)
8.80. moveset_int(p_wait_seqno integer, p_new_origin integer, p_old_origin integer, p_set_id bigint)
8.81. prefailover(p_is_candidate integer, p_failed_node boolean)
8.82. preparetableforcopy(p_tab_id integer)
8.83. rebuildlistenentries()
8.84. recreate_log_trigger(p_tab_attkind text, p_tab_id oid, p_fq_table_name text)
8.85. registernodeconnection(p_nodeid integer)
8.86. registry_get_int4(p_default text, p_key integer)
8.87. registry_get_text(p_default text, p_key text)
8.88. registry_get_timestamp(p_default text, p_key timestamp with time zone)
8.89. registry_set_int4(p_value text, p_key integer)
8.90. registry_set_text(p_value text, p_key text)
8.91. registry_set_timestamp(p_value text, p_key timestamp with time zone)
8.92. repair_log_triggers(only_locked boolean)
8.93. replicate_partition(p_comment integer, p_idxname text, p_tabname text, p_nspname text, p_tab_id text)
8.94. reshapesubscription(p_sub_receiver integer, p_sub_provider integer, p_sub_origin integer)
8.95. resubscribenode(p_receiver integer, p_provider integer, p_origin integer)
8.96. sequencelastvalue(p_seqname text)
8.97. sequencesetvalue(p_ignore_missing integer, p_last_value integer, p_ev_seqno bigint, p_seq_origin bigint, p_seq_id boolean)
8.98. setaddsequence(p_seq_comment integer, p_fqname integer, p_seq_id text, p_set_id text)
8.99. setaddsequence_int(p_seq_comment integer, p_fqname integer, p_seq_id text, p_set_id text)
8.100. setaddtable(p_tab_comment integer, p_tab_idxname integer, p_fqname text, p_tab_id name, p_set_id text)
8.101. setaddtable_int(p_tab_comment integer, p_tab_idxname integer, p_fqname text, p_tab_id name, p_set_id text)
8.102. setdropsequence(p_seq_id integer)
8.103. setdropsequence_int(p_seq_id integer)
8.104. setdroptable(p_tab_id integer)
8.105. setdroptable_int(p_tab_id integer)
8.106. setmovesequence(p_new_set_id integer, p_seq_id integer)
8.107. setmovesequence_int(p_new_set_id integer, p_seq_id integer)
8.108. setmovetable(p_new_set_id integer, p_tab_id integer)
8.109. setmovetable_int(p_new_set_id integer, p_tab_id integer)
8.110. slon_node_health_check()
8.111. slon_quote_brute(p_tab_fqname text)
8.112. slon_quote_input(p_tab_fqname text)
8.113. slonyversion()
8.114. slonyversionmajor()
8.115. slonyversionminor()
8.116. slonyversionpatchlevel()
8.117. store_application_name(i_name text)
8.118. storelisten(p_receiver integer, p_provider integer, p_origin integer)
8.119. storelisten_int(p_li_receiver integer, p_li_provider integer, p_li_origin integer)
8.120. storenode(p_no_comment integer, p_no_id text)
8.121. storenode_int(p_no_comment integer, p_no_id text)
8.122. storepath(p_pa_connretry integer, p_pa_conninfo integer, p_pa_client text, p_pa_server integer)
8.123. storepath_int(p_pa_connretry integer, p_pa_conninfo integer, p_pa_client text, p_pa_server integer)
8.124. storeset(p_set_comment integer, p_set_id text)
8.125. storeset_int(p_set_comment integer, p_set_origin integer, p_set_id text)
8.126. string_agg(text)
8.127. subscribeset(p_omit_copy integer, p_sub_forward integer, p_sub_receiver integer, p_sub_provider boolean, p_sub_set boolean)
8.128. subscribeset_int(p_omit_copy integer, p_sub_forward integer, p_sub_receiver integer, p_sub_provider boolean, p_sub_set boolean)
8.129. tablestovacuum()
8.130. terminatenodeconnections(p_failed_node integer)
8.131. uninstallnode()
8.132. unlockset(p_set_id integer)
8.133. unsubscribe_abandoned_sets(p_failed_node integer)
8.134. unsubscribeset(p_force integer, p_sub_receiver integer, p_sub_set boolean)
8.135. unsubscribeset_int(p_sub_receiver integer, p_sub_set integer)
8.136. updaterelname()
8.137. updatereloid(p_only_on_node integer, p_set_id integer)
8.138. upgradeschema(p_old text)
Index
List of Tables
4-1. Trigger Behaviour