Tue Jun 12 00:28:48 PDT 2012
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
http://www.slony.info/bugzilla/show_bug.cgi?id=269 Summary: Slony auto-start fine but not replicated Product: Slony-I Version: 2.0 Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: low Component: slon AssignedTo: slony1-bugs at lists.slony.info ReportedBy: rsivaguru87 at gmail.com CC: slony1-bugs at lists.slony.info Estimated Hours: 0.0 Created an attachment (id=145) --> (http://www.slony.info/bugzilla/attachment.cgi?id=145) Postgres repliccation problem on slony auto start up process I m using Postgres DB to replicate. Slony works fine when manually execute the script, slon clustername "dbname=tnxxx host=10.xx.xxx.xx user=postgres password=xxxx" when after configure slony with auto-start, it results as, [root at abcdg~]# /etc/start_slon.sh start Starting slon: /usr/local/pgsql/bin/slon -f /etc/slon/slon.conf 1>> /etc/slon/slon.log 2>&1 & [root at sdgfdbstg001 ~]# /etc/start_slon.sh status SLON_CONF:/etc/slon/slon.conf SLON_BIN_PATH:/usr/local/pgsql/bin **** Slon running as PID:23386 **** ############################################################################## My slon.conf # # # Sets how many cleanup cycles to run before a vacuum is done. # Range: [0,100], default: 3 #vac_frequency=3 # Aging interval to use for deleting old events and for trimming # data from sl_log_1/sl_log_2 #cleanup_interval="10 minutes" # Debug log level (higher value ==> more output). Range: [0,4], default 4 #log_level=4 # Check for updates at least this often in milliseconds. # Range: [10-60000], default 2000 #sync_interval=2000 # Maximum amount of time in milliseconds before issuing a SYNC event, # This prevents a possible race condition in which the action sequence # is bumped by the trigger while inserting the log row, which makes # this bump is immediately visible to the sync thread, but # the resulting log rows are not visible yet. If the sync is picked # up by the subscriber, processed and finished before the transaction # commits, this transaction's changes will not be replicated until the # next SYNC. But if all application activity suddenly stops, # there will be no more sequence bumps, so the high frequent -s check # won't detect that. Thus, the need for sync_interval_timeout. # Range: [0-120000], default 10000 #sync_interval_timeout=10000 # Maximum number of SYNC events to group together when/if a subscriber # falls behind. SYNCs are batched only if there are that many available # and if they are contiguous. Every other event type in between leads to # a smaller batch. And if there is only one SYNC available, even -g60 # will apply just that one. As soon as a subscriber catches up, it will # apply every single SYNC by itself. # Range: [0,100], default: 6 #sync_group_maxsize=6 # Size above which an sl_log_? row's log_cmddata is considered large. # Up to 500 rows of this size are allowed in memory at once. Rows larger # than that count into the sync_max_largemem space allocated and free'd # on demand. # Range: [1024,32768], default: 8192 #sync_max_rowsize=8192 # Maximum amount of memory allowed for large rows. Note that the algorithm # will stop fetching rows AFTER this amount is exceeded, not BEFORE. This # is done to ensure that a single row exceeding this limit alone does not # stall replication. # Range: [1048576,1073741824], default: 5242880 #sync_max_largemem=5242880 # How long to wait (in seconds) before timeout when querying for remote events # Range: [30,30000], default: 300 # remote_listen_timeout=300 # If this parameter is 1, messages go both to syslog and the standard # output. A value of 2 sends output only to syslog (some messages will # still go to the standard output/error). The default is 0, which means # syslog is off. # Range: [0-2], default: 0 #syslog=0 # If true, include the process ID on each log line. Default is false. #log_pid=false # If true, include the timestamp on each log line. Default is true. # Note that if syslog is activated, then the timestamp is suppressed, # irrespective of the values of log_timestamp or log_timestamp_format #log_timestamp=true # A strftime()-conformant format string for use with log timestamps. # Default is '%Y-%m-%d %H:%M:%S %Z' #log_timestamp_format='%Y-%m-%d %H:%M:%S %Z' # Where to write the pid file. Default: no pid file pid_file='/tmp/slon.pid' # Sets the syslog "facility" to be used when syslog enabled. Valid # values are LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. #syslog_facility=LOCAL0 # Sets the program name used to identify slon messages in syslog. #syslog_ident=slon # Set the cluster name that this instance of slon is running against # default is to read it off the command line cluster_name='sloncluster' # Set slon's connection info, default is to read it off the command line conn_info='host=xx.xxx.xxx.xx port=5432 user=postgres password=postgres' # maximum time planned for grouped SYNCs # If replication is behind, slon will try to increase numbers of # syncs done targetting that they should take this quantity of # time to process. in ms # Range [10000,600000], default 60000. #desired_sync_time=60000 # Execute the following SQL on each node at slon connect time # useful to set logging levels, or to tune the planner/memory # settings. You can specify multiple statements by separating # them with a ; #sql_on_connection="SET log_min_duration_statement TO '1000';" # Command to run upon committing a log archive. # This command is passed one parameter, namely the full pathname of # the archive file #command_on_logarchive="/usr/local/bin/movearchivetoarchive" # A PostgreSQL value compatible with ::interval which indicates how # far behind this node should lag its providers. # lag_interval="8 minutes" # Directory in which to stow sync archive files # archive_dir="/tmp/somewhere" # These are used to cause a node to watch for a final SYNC, and then # terminate. You must supply the provider and the SYNC number # quit_sync_provider=1 # quit_sync_finalsync=21341 # Should the cleanup thread DELETE data from sl_log_1/2, or # should it leave the trimming to the TRUNCATE? # cleanup_deletelogs=false ############################################################################# ############################################################################# My start_slon.sh ############################################################################ #!/bin/sh # # The following lines are ones you may wish to customize; # alternatively, you may set SLON_BUILD and SLON_CONF in your # environment to override the values in this script. SLON_BIN_PATH=${SLON_BUILD:-"/home/chris/dbs/postgresql-8.3.3/bin"} SLON_CONF=${SLON_CONF:-"${HOME}/test/slon-conf.1"} SLON_LOG=${SLON_LOG:-"${HOME}/test/slon.1.log"} # If you use syslog, then this may use /dev/null # shouldn't need to edit anything below this test -x "$SLON_BIN_PATH/slon" || (echo "missing slon - ${SLON_BIN_PATH}/slon"; exit 1) test -r "$SLON_CONF" || (echo "No slon conf file - $SLON_CONF"; exit 1) PID_LINE=`grep pid_file $SLON_CONF | cut -d "#" -f 1 | grep "^[:space:]*pid_file='.*'"` PID_FILE=`echo $PID_LINE | cut -d "=" -f 2 | cut -d "'" -f 2` if [ "x$PID_FILE" == "x" ]; then echo "pid_file not found in slon conf file - $SLON_CONF" exit 1 else if [ -f $PID_FILE ]; then PID=`cat $PID_FILE` FINDPID=`ps -p ${PID} | awk '{print $1}' | grep "^$PID\$"` fi fi case "$1" in start) if [ ! -z "$FINDPID" ]; then echo "**** slon already running - PID $PID ****" exit 1 fi touch $SLON_LOG test -w "$SLON_LOG" || (echo "**** SLON_LOG not writable - $SLON_LOG ****"; exit 1) echo "Starting slon: $SLON_BIN_PATH/slon -f ${SLON_CONF} 1>> ${SLON_LOG} 2>&1 &" $SLON_BIN_PATH/slon -f ${SLON_CONF} 1>> ${SLON_LOG} 2>&1 & ;; stop) echo "Stopping slon" if [ ! -z "$FINDPID" ]; then kill -15 ${PID} echo "Killed slon at PID ${PID}" else echo "**** slon with PID ${PID} not found ****" fi ;; status) echo "SLON_CONF:${SLON_CONF}" echo "SLON_BIN_PATH:${SLON_BIN_PATH}" if [ -f $PID_FILE ]; then if [ ! -z "$FINDPID" ]; then echo "**** Slon running as PID:$PID ****" else echo "**** Slon not running - PID:$PID - ${FINDPID} ****" fi else echo "**** Slon not running - no PID file ${PID_FILE} ****" fi ;; *) echo "Usage: $0 [start|stop|status]" ;; esac ############################################################################### I could not replicate throughslon auto script process Please help me Thanks Sivaguru -- Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. You are the assignee for the bug.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-bugs mailing list