"Index Cond": "a",
"TID Cond": "a",
"Recheck Cond": "a",
+ "Conflict Resolution": "a",
+ "Conflict Arbiter Indexes": "a",
+ "Tuples Inserted": 0,
+ "Conflicting Tuples": 0,
"Target Tables": "a",
"Operation": "Insert",
"Operation": "Delete",
create index i_tt2 on tt2(a);
create index i_tt3_a on tt3(a);
create index i_tt3_b on tt3(b);
+create table ct1 (a int unique, b int);
+insert into ct1 values (1,1), (2,2);
+
create or replace function t_tt1_1() returns trigger as $$
BEGIN
NEW.b := -NEW.a;
\echo ###### Delete on partitioned tables
explain (analyze on, buffers on, verbose on, format :format)
DELETE FROM p WHERE a = 100;
+\echo ###### ON CONFLICT
+explain (analyze on, buffers on, verbose on, format :format)
+ INSERT INTO ct1 VALUES (1,1) ON CONFLICT (a) DO UPDATE SET b = EXCLUDED.b + 1;
-- BitmapAnd/Inner/Right/ForegnScan
{P_LossyHeapBlks, "(" ,"Lossy Heap Blocks", NULL, false, NULL, SETTER(lossy_heap_blks)},
{P_RowsJoinFltRemvd,")" ,"Rows Removed by Join Filter", NULL, false, NULL, SETTER(joinfilt_removed)},
{P_TargetTables, "_" ,"Target Tables", NULL, false, NULL, NULL},
+ {P_ConfRes, "%" ,"Conflict Resolution", NULL, false, NULL, SETTER(conflict_resolution)},
+ {P_ConfArbitIdx, "@" ,"Conflict Arbiter Indexes",NULL, false, NULL, SETTER(conflict_arbiter_indexes)},
+ {P_TuplesInserted, "^" ,"Tuples Inserted", NULL, false, NULL, SETTER(tuples_inserted)},
+ {P_ConfTuples, "+" ,"Conflicting Tuples", NULL, false, NULL, SETTER(conflicting_tuples)},
{P_Invalid, NULL, NULL, NULL, false, NULL, NULL}
};
P_ExactHeapBlks,
P_LossyHeapBlks,
P_RowsJoinFltRemvd,
- P_TargetTables
+ P_TargetTables,
+ P_ConfRes,
+ P_ConfArbitIdx,
+ P_TuplesInserted,
+ P_ConfTuples
} pgsp_prop_tags;
typedef struct
DEFAULT_SETTER(exact_heap_blks);
DEFAULT_SETTER(lossy_heap_blks);
DEFAULT_SETTER(joinfilt_removed);
+DEFAULT_SETTER(conflict_resolution);
+LIST_SETTER(conflict_arbiter_indexes);
+DEFAULT_SETTER(tuples_inserted);
+DEFAULT_SETTER(conflicting_tuples);
+
#define ISZERO(s) (!s || strcmp(s, "0") == 0 || strcmp(s, "0.000") == 0 )
#define HASSTRING(s) (s && strlen(s) > 0)
}
print_prop_if_exists(s, "Heap Fetches: ", v->heap_fetches, level, exind);
+ print_prop_if_exists(s, "Conflict Resolution: ",
+ v->conflict_resolution, level, exind);
+ print_propstr_if_exists(s, "Conflict Arbiter Indexes: ",
+ v->conflict_arbiter_indexes, level, exind);
+ print_prop_if_exists(s, "Tuples Inserted: ",
+ v->tuples_inserted, level, exind);
+ print_prop_if_exists(s, "Conflicting Tuples: ",
+ v->conflicting_tuples, level, exind);
if (!ISZERO(v->shared_hit_blks) ||
!ISZERO(v->shared_read_blks) ||
const char *exact_heap_blks;
const char *lossy_heap_blks;
const char *joinfilt_removed;
+ const char *conflict_resolution;
+ StringInfo conflict_arbiter_indexes;
+ const char *tuples_inserted;
+ const char *conflicting_tuples;
const char *tmp_obj_name;
const char *tmp_schema_name;
SETTERDECL(exact_heap_blks);
SETTERDECL(lossy_heap_blks);
SETTERDECL(joinfilt_removed);
+SETTERDECL(conflict_resolution);
+SETTERDECL(conflict_arbiter_indexes);
+SETTERDECL(tuples_inserted);
+SETTERDECL(conflicting_tuples);