Just some questions, which might be helpful.
What size is this index?
What is underlying table size?
Is ANALYZE running regularly (autovacuum or manual)?
What are stats for exported_when column (pg_stats)?
Did you look at pg_locks during this lengthy update?
Do you have many concurrent statements
I'm seeing occasional simple-looking updates take way longer than I think they
should, and if my theory about it is correct, it's not actually a problem.
Consider this index, intended to provide extremely quick access to a small
number of items from a much larger table:
create index not_expor