Jan Wieck jan at wi3ck.info
Fri Sep 19 15:51:40 PDT 2014
On 09/19/2014 04:55 PM, Steve Singer wrote:
> On 09/19/2014 01:50 PM, Kristopher wrote:
>> I have the following setup in my conf file:
>>
>> cleanup_interval="5 seconds"
>> sync_interval=1000
>>
>> cluster_name='dbcluster01'
>> conn_info='...'
>>
>> And, via the log, it looks like slony is picking up on the 5 second
>> cleanup interval:
>>
>> 2014-09-15 09:31:40 EDT CONFIG main: String option pid_file = [NULL]
>> 2014-09-15 09:31:40 EDT CONFIG main: String option archive_dir = [NULL]
>> 2014-09-15 09:31:40 EDT CONFIG main: String option sql_on_connection =
>> [NULL]
>> 2014-09-15 09:31:40 EDT CONFIG main: String option lag_interval = [NULL]
>> 2014-09-15 09:31:40 EDT CONFIG main: String option command_on_logarchive
>> = [NULL]
>> 2014-09-15 09:31:40 EDT CONFIG main: String option syslog_facility = LOCAL0
>> 2014-09-15 09:31:40 EDT CONFIG main: String option syslog_ident = slon
>> 2014-09-15 09:31:40 EDT CONFIG main: String option cleanup_interval = 5
>> seconds
>>
>> However, it only actually runs cleanup about every 10 minutes (the default):
>>
>
> We seem to be using
> #define SLON_CLEANUP_SLEEP			600 /* sleep 10 minutes between */
>
> as basis to a random time to sleep between calling the cleanup process.
>    We then pass the cleanup_interval from  config file to the stored
> function.
>
> Maybe Jan or Chris can comment if they remember how this was intended to
> work with a cleanup_interval that is specified in the config file.

There are two "possible" variables here. First the cleanup_interval that 
is passed to the cleanup stored procedure, controlling how old an event 
must be at minimum to be purged from sl_event. Second the frequency at 
which the cleanup stored procedure is invoked by the slon daemon.

All or none of this could currently be screwed up because of being 
miscommunicated between Chris and me.


Jan



>
>
>
> For purposes of your upgrade you want to make sure that sl_log_1 and
> sl_log_2 have no rows in them then you can upgrade.
>
>
>
>> NOTICE:  Slony-I: log switch to sl_log_1 complete - truncate sl_log_2
>> CONTEXT:  PL/pgSQL function _dbcluster01.cleanupevent(interval) line 94
>> at assignment
>> 2014-09-18 06:28:40 EDT INFO   cleanupThread:    0.368 seconds for
>> cleanupEvent()
>> NOTICE:  Slony-I: Logswitch to sl_log_2 initiated
>> CONTEXT:  SQL statement "SELECT "_dbcluster01".logswitch_start()"
>> PL/pgSQL function _dbcluster01.cleanupevent(interval) line 96 at PERFORM
>> 2014-09-18 06:39:27 EDT INFO   cleanupThread:    0.018 seconds for
>> cleanupEvent()
>> NOTICE:  Slony-I: log switch to sl_log_2 complete - truncate sl_log_1
>> CONTEXT:  PL/pgSQL function _dbcluster01.cleanupevent(interval) line 94
>> at assignment
>> 2014-09-18 06:51:10 EDT INFO   cleanupThread:    0.106 seconds for
>> cleanupEvent()
>> 2014-09-18 06:51:10 EDT INFO   cleanupThread:    0.006 seconds for vacuuming
>> NOTICE:  Slony-I: Logswitch to sl_log_1 initiated
>> CONTEXT:  SQL statement "SELECT "_dbcluster01".logswitch_start()"
>> PL/pgSQL function _dbcluster01.cleanupevent(interval) line 96 at PERFORM
>> 2014-09-18 07:01:52 EDT INFO   cleanupThread:    0.016 seconds for
>> cleanupEvent()
>> NOTICE:  Slony-I: log switch to sl_log_1 complete - truncate sl_log_2
>> CONTEXT:  PL/pgSQL function _dbcluster01.cleanupevent(interval) line 94
>> at assignment
>> 2014-09-18 07:13:33 EDT INFO   cleanupThread:    0.110 seconds for
>> cleanupEvent()
>> NOTICE:  Slony-I: Logswitch to sl_log_2 initiated
>> CONTEXT:  SQL statement "SELECT "_dbcluster01".logswitch_start()"
>> PL/pgSQL function _dbcluster01.cleanupevent(interval) line 96 at PERFORM
>> 2014-09-18 07:24:46 EDT INFO   cleanupThread:    0.014 seconds for
>> cleanupEvent()
>> 2014-09-18 07:24:46 EDT INFO   cleanupThread:    0.006 seconds for vacuuming
>> NOTICE:  Slony-I: log switch to sl_log_2 complete - truncate sl_log_1
>> CONTEXT:  PL/pgSQL function _dbcluster01.cleanupevent(interval) line 94
>> at assignment
>> 2014-09-18 07:36:17 EDT INFO   cleanupThread:    0.114 seconds for
>> cleanupEvent()
>> NOTICE:  Slony-I: Logswitch to sl_log_1 initiated
>> CONTEXT:  SQL statement "SELECT "_dbcluster01".logswitch_start()"
>> PL/pgSQL function _dbcluster01.cleanupevent(interval) line 96 at PERFORM
>> 2014-09-18 07:47:31 EDT INFO   cleanupThread:    0.018 seconds for
>> cleanupEvent()
>>
>> In order to perform the upgrade to the latest version, it says I need to
>> set this interval low to clear up any data in the log tables, but I'm
>> stuck trying to get that to happen.
>>
>> Any ideas?
>>
>>
>> Kristopher
>>
>>
>>
>> _______________________________________________
>> Slony1-general mailing list
>> Slony1-general at lists.slony.info
>> http://lists.slony.info/mailman/listinfo/slony1-general
>>
>
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general
>


-- 
Jan Wieck
Senior Software Engineer
http://slony.info


More information about the Slony1-general mailing list