slon_appendquery(&query, "%s%d",
(pset->prev == NULL) ? "" : ",",
pset->set_id);
- slon_appendquery(&query, "); ");
+ slon_appendquery(&query, ") and SSY.ssy_origin=%d; ",node->no_id);
start_monitored_event(&pm);
res1 = PQexec(local_dbconn, dstring_data(&query));
char *ssy_action_list = PQgetvalue(res1, tupno1, 4);
int64 ssy_seqno;
+ if (strcmp(ssy_snapshot,"1:1:")==0 &&
+ ssy_seqno==0)
+ {
+ /**
+ * we don't yet have a row in setsync with real data
+ * this means the ACCEPT_SET has not yet come in.
+ * ignore this set.
+ */
+ slon_log(SLON_WARN, "remoteWorkerThread_%d: skipping set %d ACCEPT_SET not yet received\n",
+ node->no_id, sub_set);
+ continue;
+ }
+
slon_scanint64(PQgetvalue(res1, tupno1, 1), &ssy_seqno);
if (min_ssy_seqno < 0 || ssy_seqno < min_ssy_seqno)
min_ssy_seqno = ssy_seqno;