XLogRecPtr origlsn;
TimestampTz committime;
TimestampTz current;
- char statbuf[100];
+ char statbuf[100];
Assert(bdr_apply_con != NULL);
long sec;
int usec;
- current = TimestampTzPlusMilliseconds(current, -bdr_apply_con->apply_delay);
+ current = TimestampTzPlusMilliseconds(current,
+ -bdr_apply_con->apply_delay);
TimestampDifference(current, replication_origin_timestamp,
&sec, &usec);
foreach(command_i, commands)
{
- List *plantree_list;
+ List *plantree_list;
List *querytree_list;
Node *command = (Node *) lfirst(command_i);
ListCell *stmt_i;
ident = text_to_cstring(&node_class->riname);
if (sscanf(ident, "bdr: "UINT64_FORMAT"-%u-%u-%u:%s",
- &remote_sysid, &remote_tli, &remote_dboid, &local_dboid, NameStr(replication_name)) != 4)
+ &remote_sysid, &remote_tli, &remote_dboid, &local_dboid,
+ NameStr(replication_name)) != 4)
elog(ERROR, "could not parse sysid: %s", ident);
ReleaseSysCache(node);
pfree(ident);
TransactionIdGetCommitTsData(xmin, &local_ts, &local_node_id_raw);
local_node_id = local_node_id_raw;
- check_apply_update(local_node_id, local_ts, &apply_update, &log_update);
+ check_apply_update(local_node_id, local_ts,
+ &apply_update, &log_update);
if (log_update)
- do_log_update(local_node_id, apply_update, local_ts, idxrel, old_key);
+ do_log_update(local_node_id, apply_update, local_ts,
+ idxrel, old_key);
if (apply_update)
do_apply_update(rel, oldtid, old_tuple, new_tuple);
ereport(ERROR,
(errcode(ERRCODE_INTEGRITY_CONSTRAINT_VIOLATION),
- errmsg("CONFLICT: could not find existing tuple for pkey %s", s_key.data)));
+ errmsg("CONFLICT: could not find existing tuple for pkey %s",
+ s_key.data)));
}
check_sequencer_wakeup(rel);
}
static void
-do_apply_update(Relation rel, ItemPointerData oldtid, HeapTuple old_tuple, BDRTupleData new_tuple)
+do_apply_update(Relation rel, ItemPointerData oldtid,
+ HeapTuple old_tuple, BDRTupleData new_tuple)
{
HeapTuple nt;
Form_pg_attribute att = desc->attrs[i];
char kind = pq_getmsgbyte(s);
const char *data;
- int len;
+ int len;
switch (kind)
{
tup->isnull[i] = false;
len = pq_getmsgint(s, 4); /* read length */
- getTypeBinaryInputInfo(att->atttypid, &typreceive, &typioparam);
+ getTypeBinaryInputInfo(att->atttypid,
+ &typreceive, &typioparam);
/* create StringInfo pointing into the bigger buffer */
initStringInfo(&buf);
HeapTuple tup;
read_tuple_parts(s, rel, &tupdata);
- tup = heap_form_tuple(RelationGetDescr(rel), tupdata.values, tupdata.isnull);
+ tup = heap_form_tuple(RelationGetDescr(rel),
+ tupdata.values, tupdata.isnull);
return tup;
}
BTEqualStrategyNumber);
if (!OidIsValid(operator))
- elog(ERROR, "could not lookup equality operator for type %u, optype %u in opfamily %u",
+ elog(ERROR,
+ "could not lookup equality operator for type %u, optype %u in opfamily %u",
atttype, optype, opfamily);
regop = get_opcode(operator);