When upgrading to a new postgres version a dump/reload of the database might be necessary (check the postgresql documentation). The pg_dump utility of the postgres distribution does not dump large objects. There are two little programs named loadlo and unloadlo. They read/write all large objects from/in a directory. The directory has to be accessible by the server. To make them work correctly it is important to preserve the oids while dumping with the -o option of pg_dump. loadlo has to be run after loading the dumped script with psql by the postgres superuser.:
dump old database...
%md /tmp/dump %pg_dump kaspaliste -ov /tmp/dump/dump.sql %unloadlo -o /tmp/dump |
...upgrade database and reload...
%psql kaspaliste -f /tmp/dump/dump.sql %loadlo -i /tmp/dump |