diff -uNrp zabbix-2.0.6-1/include/ipc.h zabbix-2.0.6-1.m/include/ipc.h
--- zabbix-2.0.6-1/include/ipc.h	2013-06-19 08:30:06.957051043 +0900
+++ zabbix-2.0.6-1.m/include/ipc.h	2013-07-23 07:50:52.480661064 +0900
@@ -33,6 +33,7 @@
 #define ZBX_IPC_COLLECTOR_DISKSTAT	'm'
 #define ZBX_IPC_SELFMON_ID		'S'
 #define ZBX_IPC_PROXY_TR_ID		'P'
+#define ZBX_IPC_DS_TIME_ID		'D'
 
 key_t	zbx_ftok(char *path, int id);
 int	zbx_shmget(key_t key, size_t size);
diff -uNrp zabbix-2.0.6-1/include/mutexs.h zabbix-2.0.6-1.m/include/mutexs.h
--- zabbix-2.0.6-1/include/mutexs.h	2013-07-23 07:49:25.188754848 +0900
+++ zabbix-2.0.6-1.m/include/mutexs.h	2013-07-23 07:50:04.822166329 +0900
@@ -56,7 +56,8 @@
 #	define ZBX_MUTEX_DISKSTATS	9
 #	define ZBX_MUTEX_SERVICES	10
 #	define ZBX_MUTEX_PROXY_TR	11
-#	define ZBX_MUTEX_COUNT		12
+#	define ZBX_MUTEX_DS_TIME	12
+#	define ZBX_MUTEX_COUNT		13
 
 #	define ZBX_MUTEX_MAX_TRIES	20	/* seconds */
 
diff -uNrp zabbix-2.0.6-1/src/libs/zbxdbcache/dbcache.c zabbix-2.0.6-1.m/src/libs/zbxdbcache/dbcache.c
--- zabbix-2.0.6-1/src/libs/zbxdbcache/dbcache.c	2013-06-19 08:30:06.958051052 +0900
+++ zabbix-2.0.6-1.m/src/libs/zbxdbcache/dbcache.c	2013-07-23 07:58:52.476640158 +0900
@@ -142,6 +142,7 @@ static ZBX_DC_CACHE	*cache = NULL;
 
 extern int		*proxy_tr;
 extern ZBX_MUTEX	proxy_tr_lock;
+extern double		*ds_time;
 
 /******************************************************************************
  *                                                                            *
@@ -2312,6 +2313,13 @@ int	DCsync_history(int sync_type)
 
 		if (0 != (daemon_type & ZBX_DAEMON_TYPE_PROXY))
 		{
+			while (0 <= *ds_time && *ds_time + 10 > zbx_time())
+			{
+				/* sleep 0.1 sec */
+				struct timespec st = { .tv_sec = 0, .tv_nsec = 100 * 1000 * 1000};
+				zabbix_log(LOG_LEVEL_WARNING, "Data Sender will wait till History Syncers are cleaned.");
+				nanosleep(&st, NULL);
+			}
 			zbx_mutex_lock(&proxy_tr_lock);
 			(*proxy_tr)++;
 			zbx_mutex_unlock(&proxy_tr_lock);
diff -uNrp zabbix-2.0.6-1/src/zabbix_proxy/datasender/datasender.c zabbix-2.0.6-1.m/src/zabbix_proxy/datasender/datasender.c
--- zabbix-2.0.6-1/src/zabbix_proxy/datasender/datasender.c	2013-06-19 08:30:06.960051071 +0900
+++ zabbix-2.0.6-1.m/src/zabbix_proxy/datasender/datasender.c	2013-07-23 08:01:22.207192054 +0900
@@ -32,6 +32,7 @@
 extern unsigned char	process_type;
 
 extern int		*proxy_tr;
+extern int		*ds_time;
 
 /******************************************************************************
  *                                                                            *
@@ -167,6 +168,7 @@ void	main_datasender_loop()
 
 		records = 0;
 retry_history:
+		*ds_time = zbx_time();
 		while (proxy_tr && (pts = *proxy_tr) > 0)
                 {
 			if (pts != pts_o)
@@ -175,6 +177,7 @@ retry_history:
 
 			nanosleep(&st, NULL);
                 }
+		*ds_time = -1;
 		history_sender(&j, &r, ZBX_PROTO_VALUE_HISTORY_DATA,
 				proxy_get_hist_data, proxy_set_hist_lastid);
 		records += r;
diff -uNrp zabbix-2.0.6-1/src/zabbix_proxy/proxy.c zabbix-2.0.6-1.m/src/zabbix_proxy/proxy.c
--- zabbix-2.0.6-1/src/zabbix_proxy/proxy.c	2013-06-19 08:30:06.968051149 +0900
+++ zabbix-2.0.6-1.m/src/zabbix_proxy/proxy.c	2013-07-23 08:22:53.022534748 +0900
@@ -191,6 +191,9 @@ int		*proxy_tr;
 int		proxy_tr_id;
 ZBX_MUTEX	proxy_tr_lock;
 
+double		*ds_time;
+int		ds_time_id;
+
 /******************************************************************************
  *                                                                            *
  * Function: zbx_set_defaults                                                 *
@@ -583,6 +586,57 @@ static void free_proxy_tr(void)
 	return;
 }
 
+static void init_ds_time(void)
+{
+	key_t shm_key;
+
+	if (-1 == (shm_key = zbx_ftok(CONFIG_FILE, ZBX_IPC_DS_TIME_ID)))
+	{
+		zabbix_log(LOG_LEVEL_CRIT, "cannot create IPC key for Data Sender Time");
+		exit(FAIL);
+	}
+
+/*
+ * Mutex is not needed, because Data Sende must be 1 process.
+	if (ZBX_MUTEX_ERROR == zbx_mutex_create_force(&ds_time_lock, ZBX_MUTEX_DS_TIME))
+	{
+		zbx_error("unable to create mutex for Data SEnder Time");
+		exit(FAIL);
+	}
+*/
+
+	if (-1 == (ds_time_id = zbx_shmget(shm_key, sizeof(double))))
+	{
+		zabbix_log(LOG_LEVEL_CRIT, "cannot allocate shared memory for Data Sender Time");
+		exit(FAIL);
+	}
+
+	if ((void *)(-1) == (ds_time = shmat(ds_time_id, NULL, 0)))
+	{
+		zabbix_log(LOG_LEVEL_CRIT, "cannot attach shared memory for Data Sender Time: %s",
+				zbx_strerror(errno));
+		exit(FAIL);
+	}
+	*ds_time = -1;
+
+	return;
+}
+
+static void free_ds_time(void)
+{
+	// zbx_mutex_lock(&ds_time_lock);
+	if (-1 == shmctl(ds_time_id, IPC_RMID, 0))
+	{
+		zabbix_log(LOG_LEVEL_WARNING, "cannot remove shared memory for Data Sender Time: %s",
+				zbx_strerror(errno));
+	}
+	// zbx_mutex_unlock(&proxy_tr_lock);
+
+	// zbx_mutex_destroy(&proxy_tr_lock);
+
+	return;
+}
+
 int	MAIN_ZABBIX_ENTRY()
 {
 	pid_t		pid;
@@ -645,6 +699,7 @@ int	MAIN_ZABBIX_ENTRY()
 	init_selfmon_collector();
 
 	init_proxy_tr();
+	init_ds_time();
 
 	DBconnect(ZBX_DB_CONNECT_NORMAL);
 	DCsync_configuration();
@@ -666,6 +721,12 @@ int	MAIN_ZABBIX_ENTRY()
 		}
 	}
 
+	if (1 < CONFIG_DATASENDER_FORKS)
+	{
+		zabbix_log(LOG_LEVEL_CRIT, "Data Sender must be 1 or 0 process");
+		exit(1);
+	}
+
 	for (i = 0; i < threads_num; i++)
 	{
 		if (0 == (pid = zbx_child_fork()))
@@ -873,6 +934,7 @@ void	zbx_on_exit()
 	zbx_remove_sqlite3_mutex();
 #endif
 
+	free_ds_time();
 	free_proxy_tr();
 
 	free_selfmon_collector();
diff -uNrp zabbix-2.0.6-1/src/zabbix_server/server.c zabbix-2.0.6-1.m/src/zabbix_server/server.c
--- zabbix-2.0.6-1/src/zabbix_server/server.c	2013-06-19 08:30:06.969051159 +0900
+++ zabbix-2.0.6-1.m/src/zabbix_server/server.c	2013-07-23 08:07:30.217000478 +0900
@@ -188,6 +188,7 @@ ZBX_MUTEX	node_sync_access;
 
 int		*proxy_tr;
 ZBX_MUTEX	proxy_tr_lock;
+double		*ds_time;
 
 /******************************************************************************
  *                                                                            *
