I'm using PostgreSQL 9.3.16 on Windows 7 and the data directory was created from a filesystem backup of an installation
runningon another machine, which failed.
After starting the postgres service I ran `pg_dump` using pgAdminIII to backup the databases.
pg_dump.exe --host localhost --port 5433 --username "postgres" --no-password --format custom --blobs --verbose
--file"db-2017-03-22.backup" "mydb"
One of them reported the following error:
pg_dump: dumping contents of table "public.bandana"
pg_dump: dumping contents of table "public.bodycontent"
pg_dump: Dumping the contents of table "bodycontent" failed: PQgetResult() failed.
pg_dump: Error message from server: ERROR: missing chunk number 0 for toast value 314936 in pg_toast_36791
pg_dump: The command was: COPY public.bodycontent (bodycontentid, body, contentid, bodytypeid) TO stdout;
Process returned exit code 1.
Since then I've done some digging around and run the following commands:
REINDEX table pg_toast.pg_toast_36791;
VACUUM ANALYZE bodycontent;
Both return:
Query returned successfully with no result in xx ms.
Using pgAdmin I've selected the Maintenace option and run a VACUUM (no options) , ANALYSE and REINDEX and no errors
werereported.
I ran VACUUM with the FULL option and the following error was reported:
INFO: vacuuming "public.plugindata"
ERROR: missing chunk number 0 for toast value 289849 in pg_toast_36998
I don't have any experience with postgres or databases in general. Can anyone advise what I should do next?