BUG #15110: Unable to backup database
The following bug has been logged on the website:
Bug reference: 15110
Logged by: Murthy Mvvs
Email address: murthy.mvvs@gmail.com
PostgreSQL version: 9.5.10
Operating system: linux
Description:
Dear Team,
We are using atlassian bamboo for our build management and postgres as its
Database.
During the application upgrade, we wanted to take backup of our DB and we
are unable to do the backup due to the following error.
ERROR: could not read block 5064 in file "base/16391/16560": read only 4096
of 8192 bytes
Help in this regard is highly appreciated.
Thanks
Murthy
Hello
This error message say your underlying filesystem returned less bytes than it should be. Usually this means storage was corrupted and should be checked by sysadmins.
https://github.com/postgres/postgres/blob/REL_10_STABLE/src/backend/storage/smgr/md.c#L776
So i suggest shutdown database, then copy full PGDATA directory, check disks and filesystem and recover database from backup. Or you may try enable zero_damaged_pages (this removes your data in such pages!) and copy the surviving data (better having another copy PGDATA).
regards, Sergei