Rename the primary key index when renaming a table in pg

Also checked to make sure this does not affect foreign key constraints.
(It doesn't).

Fixes #12856
Closes #14088