"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> ERROR: setval: value 0 is out of bounds for sequence "foo_id_seq"
> (1..9223372036854775807)
> FATAL: block 0 of 1663/97972/98006 is still referenced (private 1, global
> 1)
Does that relation OID actually point to the sequence? I couldn't
duplicate this in desultory testing, so I think there's something
you didn't tell us.
regards, tom lane