diff -uNrp zabbix-2.0.4-1.orig/include/ipc.h zabbix-2.0.4-1/include/ipc.h
--- zabbix-2.0.4-1.orig/include/ipc.h	2012-12-08 20:09:14.000000000 +0900
+++ zabbix-2.0.4-1/include/ipc.h	2013-03-01 07:20:27.729364203 +0900
@@ -32,6 +32,7 @@
 #define ZBX_IPC_COLLECTOR_ID		'l'
 #define ZBX_IPC_COLLECTOR_DISKSTAT	'm'
 #define ZBX_IPC_SELFMON_ID		'S'
+#define ZBX_IPC_PROXY_TR_ID		'P'
 
 key_t	zbx_ftok(char *path, int id);
 int	zbx_shmget(key_t key, size_t size);
diff -uNrp zabbix-2.0.4-1.orig/include/mutexs.h zabbix-2.0.4-1/include/mutexs.h
--- zabbix-2.0.4-1.orig/include/mutexs.h	2012-12-08 20:09:14.000000000 +0900
+++ zabbix-2.0.4-1/include/mutexs.h	2013-03-01 07:21:41.163364224 +0900
@@ -54,7 +54,8 @@
 #	define ZBX_MUTEX_SELFMON	7
 #	define ZBX_MUTEX_CPUSTATS	8
 #	define ZBX_MUTEX_DISKSTATS	9
-#	define ZBX_MUTEX_COUNT		10
+#	define ZBX_MUTEX_PROXY_TR	10
+#	define ZBX_MUTEX_COUNT		11
 
 #	define ZBX_MUTEX_MAX_TRIES	20	/* seconds */
 
diff -uNrp zabbix-2.0.4-1.orig/src/libs/zbxdbcache/dbcache.c zabbix-2.0.4-1/src/libs/zbxdbcache/dbcache.c
--- zabbix-2.0.4-1.orig/src/libs/zbxdbcache/dbcache.c	2012-12-08 20:09:15.000000000 +0900
+++ zabbix-2.0.4-1/src/libs/zbxdbcache/dbcache.c	2013-03-01 07:19:42.171424486 +0900
@@ -141,6 +141,9 @@ ZBX_DC_CACHE;
 
 static ZBX_DC_CACHE	*cache = NULL;
 
+extern int		*proxy_tr;
+extern ZBX_MUTEX	proxy_tr_lock;
+
 /******************************************************************************
  *                                                                            *
  * Function: DCget_stats                                                      *
@@ -2125,6 +2128,13 @@ int	DCsync_history(int sync_type)
 
 		DCinit_nextchecks();
 
+		if (0 != (daemon_type & ZBX_DAEMON_TYPE_PROXY))
+		{
+			zbx_mutex_lock(&proxy_tr_lock);
+			(*proxy_tr)++;
+			zbx_mutex_unlock(&proxy_tr_lock);
+		}
+
 		DBbegin();
 
 		if (0 != (daemon_type & ZBX_DAEMON_TYPE_SERVER))
@@ -2142,6 +2152,13 @@ int	DCsync_history(int sync_type)
 
 		DBcommit();
 
+		if (0 != (daemon_type & ZBX_DAEMON_TYPE_PROXY))
+		{
+			zbx_mutex_lock(&proxy_tr_lock);
+			(*proxy_tr)--;
+			zbx_mutex_unlock(&proxy_tr_lock);
+		}
+
 		DCflush_nextchecks();
 
 		if (0 != (daemon_type & ZBX_DAEMON_TYPE_SERVER))
diff -uNrp zabbix-2.0.4-1.orig/src/zabbix_proxy/datasender/datasender.c zabbix-2.0.4-1/src/zabbix_proxy/datasender/datasender.c
--- zabbix-2.0.4-1.orig/src/zabbix_proxy/datasender/datasender.c	2012-12-08 20:09:15.000000000 +0900
+++ zabbix-2.0.4-1/src/zabbix_proxy/datasender/datasender.c	2013-03-01 07:19:42.172426916 +0900
@@ -31,6 +31,8 @@
 
 extern unsigned char	process_type;
 
+extern int		*proxy_tr;
+
 /******************************************************************************
  *                                                                            *
  * Function: host_availability_sender                                         *
@@ -143,6 +145,9 @@ void	main_datasender_loop()
 	int		records, r;
 	double		sec;
 	struct zbx_json	j;
+        /* 0.1 sec sleep */
+	struct timespec st = { .tv_sec = 0, .tv_nsec = 100 * 1000 * 1000};
+	int	pts, pts_o = 0;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In main_datasender_loop()");
 
@@ -162,6 +167,14 @@ void	main_datasender_loop()
 
 		records = 0;
 retry_history:
+		while (proxy_tr && (pts = *proxy_tr) > 0)
+                {
+			if (pts != pts_o)
+				zabbix_log(LOG_LEVEL_WARNING, "history syncer is in DCsync_history(): %d", pts);
+			pts_o = pts;
+
+			nanosleep(&st, NULL);
+                }
 		history_sender(&j, &r, ZBX_PROTO_VALUE_HISTORY_DATA,
 				proxy_get_hist_data, proxy_set_hist_lastid);
 		records += r;
diff -uNrp zabbix-2.0.4-1.orig/src/zabbix_proxy/proxy.c zabbix-2.0.4-1/src/zabbix_proxy/proxy.c
--- zabbix-2.0.4-1.orig/src/zabbix_proxy/proxy.c	2013-03-01 07:18:33.142376466 +0900
+++ zabbix-2.0.4-1/src/zabbix_proxy/proxy.c	2013-03-01 07:19:42.173426625 +0900
@@ -33,6 +33,7 @@
 
 #include "daemon.h"
 #include "zbxself.h"
+#include "ipc.h"
 
 #include "../zabbix_server/dbsyncer/dbsyncer.h"
 #include "../zabbix_server/discoverer/discoverer.h"
@@ -186,6 +187,10 @@ int	CONFIG_SERVER_STARTUP_TIME	= 0;
 /* mutex for node syncs; not used in proxy */
 ZBX_MUTEX	node_sync_access;
 
+int		*proxy_tr;
+int		proxy_tr_id;
+ZBX_MUTEX	proxy_tr_lock;
+
 /******************************************************************************
  *                                                                            *
  * Function: zbx_set_defaults                                                 *
@@ -530,6 +535,54 @@ int	main(int argc, char **argv)
 	return daemon_start(CONFIG_ALLOW_ROOT);
 }
 
+static void init_proxy_tr(void)
+{
+	key_t shm_key;
+
+	if (-1 == (shm_key = zbx_ftok(CONFIG_FILE, ZBX_IPC_PROXY_TR_ID)))
+	{
+		zabbix_log(LOG_LEVEL_CRIT, "cannot create IPC key for Proxy Transaction Management");
+		exit(FAIL);
+	}
+
+	if (ZBX_MUTEX_ERROR == zbx_mutex_create_force(&proxy_tr_lock, ZBX_MUTEX_PROXY_TR))
+	{
+		zbx_error("unable to create mutex for Proxy Transaction Management");
+		exit(FAIL);
+	}
+
+	if (-1 == (proxy_tr_id = zbx_shmget(shm_key, sizeof(int))))
+	{
+		zabbix_log(LOG_LEVEL_CRIT, "cannot allocate shared memory for Proxy Transaction Management");
+		exit(FAIL);
+	}
+
+	if ((void *)(-1) == (proxy_tr = shmat(proxy_tr_id, NULL, 0)))
+	{
+		zabbix_log(LOG_LEVEL_CRIT, "cannot attach shared memory for Proxy Transaction Management: %s",
+				zbx_strerror(errno));
+		exit(FAIL);
+	}
+	*proxy_tr = 0;
+
+	return;
+}
+
+static void free_proxy_tr(void)
+{
+	zbx_mutex_lock(&proxy_tr_lock);
+	if (-1 == shmctl(proxy_tr_id, IPC_RMID, 0))
+	{
+		zabbix_log(LOG_LEVEL_WARNING, "cannot remove shared memory for Proxy Transaction Management: %s",
+				zbx_strerror(errno));
+	}
+	zbx_mutex_unlock(&proxy_tr_lock);
+
+	zbx_mutex_destroy(&proxy_tr_lock);
+
+	return;
+}
+
 int	MAIN_ZABBIX_ENTRY()
 {
 	pid_t		pid;
@@ -591,6 +644,8 @@ int	MAIN_ZABBIX_ENTRY()
 	init_configuration_cache();
 	init_selfmon_collector();
 
+	init_proxy_tr();
+
 	DBconnect(ZBX_DB_CONNECT_NORMAL);
 	DCsync_configuration();
 	DBclose();
@@ -818,6 +873,8 @@ void	zbx_on_exit()
 	zbx_remove_sqlite3_mutex();
 #endif
 
+	free_proxy_tr();
+
 	free_selfmon_collector();
 
 	zabbix_log(LOG_LEVEL_INFORMATION, "Zabbix Proxy stopped. Zabbix %s (revision %s).",
diff -uNrp zabbix-2.0.4-1.orig/src/zabbix_server/server.c zabbix-2.0.4-1/src/zabbix_server/server.c
--- zabbix-2.0.4-1.orig/src/zabbix_server/server.c	2013-03-01 07:18:33.143435983 +0900
+++ zabbix-2.0.4-1/src/zabbix_server/server.c	2013-03-01 07:19:42.174426970 +0900
@@ -186,6 +186,9 @@ int	CONFIG_PROXYDATA_FREQUENCY	= 1;	/* 1
 /* mutex for node syncs */
 ZBX_MUTEX	node_sync_access;
 
+int		*proxy_tr;
+ZBX_MUTEX	proxy_tr_lock;
+
 /******************************************************************************
  *                                                                            *
  * Function: zbx_set_defaults                                                 *
