Duplicates
select Column1, Column2, count(*)
from yourTable
group by Column1, Column2
HAVING count(*) > 1
DELETE from SELECT
delete from mytable where id in(select id from mytable where someconditon)
Dump
## sudo -u USERNAME pg_dump -v DATABASE > d.psql