CONSTRAINT priceupdate_pkey PRIMARY KEY (id) USING INDEX TABLESPACE pgwlicsdb
We have other tables that also have duplicates for primary key.
Could you please provide feedback with regards to my query.
Remove the duplicates and then reindex the backing unique index.
If the duplicates are being created while running a supported version of PostgreSQL, and they are all using the same tablespace, consider that it is good odds whatever filesystem your tablespace is on may have issues. As you don't seem to be using a supported version you should probably fix that deficiency first though, and see whether new problematic records get created in the future.