Following the instructions for a "hard" upgrade in Chapter 2. Installation of the PostGIS manual results in large objects not being restored to the database. If you create a dump using pg_dump -Fc --oids and then use the script, the oids will be restored but not the large objects. This is not really a PostGIS issue, it can happen when dealing with any PostgreSQL database.

To remedy this situation I found that the pg_dumplo utility has the answer. The trick is to use pgdumplo to dump the large objects from the "old" PostgreSQL/PostGIS install and then use it to restore the objects to the "new" install after running the script.

The pgdumplo utility can usually be found in the contrib directory of your PostgreSQL install. For a complete example, see the README.pgdumplo file located in the contrib/pg_dumplo directory.

Note: You only need this utility if you have created database tables containing large objects. On a "stock" PostGIS database the script does it's job in a most efficient way.