Foreign key indexes are never used as you can see in pg_stat_user_indexes table. I want to remove them. Are there any disadvantages of removing foreign keys indexes due to non-usage.
db=# SELECT * FROM pg_stat_user_indexes WHERE relname='order_cancellationreason';
relid | indexrelid | schemaname | relname | indexrelname | idx_scan | idx_tup_read | idx_tup_fetch
-------+------------+------------+--------------------------+---------------------------------------------+----------+--------------+---------------
29835 | 31055 | public | order_cancellationreason | order_cancellationreason_address_id | 0 | 0 | 0
29835 | 31053 | public | order_cancellationreason | order_cancellationreason_cancelled_by_id | 0 | 0 | 0
db=#\d+ order_cancellationreason
...
Indexes:
"order_cancellationreason_cancelled_by_id" btree (cancelled_by_id)
"order_cancellationreason_address_id" btree (address_id)
Foreign-key constraints:
"cargo_id_refs_id_f4ffe34d" FOREIGN KEY (cargo_id) REFERENCES cargo_cargoinfo(id) DEFERRABLE INITIALLY DEFERRED
"order_cancellationreason_address_id_fkey" FOREIGN KEY (address_id) REFERENCES invoice_address(id) DEFERRABLE INITIALLY DEFERRED
"order_cancellationreason_cancelled_by_id_fkey" FOREIGN KEY (cancelled_by_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED