Fixes #6601 : Can't upgrade from the last 2.5.6 to 3.0 in PostgreSQL