history_text table on PostgreSQL has 3 indexes:
"history_text_pkey1" PRIMARY KEY, btree (id)
"history_text_2" UNIQUE, btree (itemid, id)
"history_text_1" btree (itemid, clock)
Since the primary key is already unique, the history_text_2 index doesn't need to be unique at all.
Also why does the history_text table out of all history tables the only one that has additional two indexes besides the (itemid, clock) index? Are they really needed.