I have a database where everything is linked with foreign keys, so the Postgres knows exactly how the database is layed out..
Well, Lets say I have Table1 and Table2.>
It's best if a primary key never changes: Renumbering them is a PITA.
If you need an ID for humans, one that has no gaps, A. Elein Mustain shows how to create a gapless sequence.