By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
ERROR: duplicate key value violates unique constraint "action_suspended_a_date_uq"
DETAIL: Key (action, a_date)=(suspended, 2020-08-18 15:09:13) already exists.
ERROR: duplicate key value violates unique constraint "action_started_a_date_uq"
DETAIL: Key (action, a_date)=(started, 2020-08-18 15:09:11) already exists.