I use SELECT lastval() to get wrong serial id after truncated the table.
when I truncate the table, I use SELECT lastval(), I got the wrong ID/
If you want to reset the sequence then:
setval('sequence_name', 0)
To list the existent sequence names issue a \ds at the psql prompt.
\ds