Dear All
I have faced through the below errors. the version that have use 2.27 how can solve it.
Process failed: StatementCallback; uncategorized SQLException for SQL [create table _orgunitstructure_temp (organisationunitid integer not null primary key, organisationunituid character(11), level integer, "idlevel1" integer, "uidlevel1" character(11), "idlevel2" integer, "uidlevel2" character(11), "idlevel3" integer, "uidlevel3" character(11), "idlevel4" integer, "uidlevel4" character(11));]; SQL state [XX001]; error code [0]; ERROR: could not read block 0 in file "base/16393/11909": read only 0 of 8192 bytes; nested exception is org.postgresql.util.PSQLException: ERROR: could not read block 0 in file "base/16393/11909": read only 0 of 8192 bytes
Azimi
···
_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help
Hi Azimi,
Unfortunately, this looks like a corruption of the database (possibly linked to hard drive issue). Do you have a recent backup that you can revert to (on different hardware)?
I would certainly advice taking a full backup at once.
Here is one story about how someone dealt with this kind of issue:
http://www.pateldenish.com/2016/09/recovering-corrupted-postgres-database.html
Knut
···
On Wed, Mar 7, 2018 at 10:38 AM, Mahmood Azimi Mahmood.Azimi@jhpiego.org wrote:
Dear All
I have faced through the below errors. the version that have use 2.27 how can solve it.
Process failed: StatementCallback; uncategorized SQLException for SQL [create table _orgunitstructure_temp (organisationunitid integer not null primary key, organisationunituid character(11), level integer, "idlevel1" integer, "uidlevel1" character(11), "idlevel2" integer, "uidlevel2" character(11), "idlevel3" integer, "uidlevel3" character(11), "idlevel4" integer, "uidlevel4" character(11));]; SQL state [XX001]; error code [0]; ERROR: could not read block 0 in file "base/16393/11909": read only 0 of 8192 bytes; nested exception is org.postgresql.util.PSQLException: ERROR: could not read block 0 in file "base/16393/11909": read only 0 of 8192 bytes
Azimi
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp
–
Knut Staring
Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar
Hi Azimi,
You seem to have created an SQL view in your database called pavotdata. Could you drop it (and rather recreate it later if you need it)?
Knut
···
On Wed, Mar 7, 2018 at 11:56 AM, Mahmood Azimi Mahmood.Azimi@jhpiego.org wrote:
Thanks Knut
We have reverted the database but the below error accrued
Process failed: StatementCallback; uncategorized SQLException for SQL [drop table _orgunitstructure;]; SQL state [2BP01]; error code [0]; ERROR: cannot drop table _orgunitstructure because other objects depend on it Detail: view pavotdata depends on table _orgunitstructure Hint: Use DROP … CASCADE to drop the dependent objects too.; nested exception is org.postgresql.util. PSQLException: ERROR: cannot drop table _orgunitstructure because other objects depend on it Detail: view pavotdata depends on table _orgunitstructure Hint: Use DROP … CASCADE to drop the dependent objects too.
Thanks
Azimi
From: Knut Staring [mailto:knutst@gmail.com]
Sent: Wednesday, March 07, 2018 2:27 PM
To: Mahmood Azimi Mahmood.Azimi@jhpiego.org
Cc: TIMIMI, Hazim Bakir timimih@who.int; dhis2-users@lists.launchpad.net
Subject: Re: [Dhis2-users] could not read block 0 in file “base/16393/11909”: read only 0 of 8192 bytes
Hi Azimi,
Unfortunately, this looks like a corruption of the database (possibly linked to hard drive issue). Do you have a recent backup that you can revert to (on different hardware)?
I would certainly advice taking a full backup at once.
Here is one story about how someone dealt with this kind of issue:
http://www.pateldenish.com/2016/09/recovering-corrupted-postgres-database.html
Knut
On Wed, Mar 7, 2018 at 10:38 AM, Mahmood Azimi Mahmood.Azimi@jhpiego.org wrote:
Dear All
I have faced through the below errors. the version that have use 2.27 how can solve it.
Process failed: StatementCallback; uncategorized SQLException for SQL [create table _orgunitstructure_temp (organisationunitid integer not null primary key, organisationunituid character(11), level integer, "idlevel1" integer, "uidlevel1" character(11), "idlevel2" integer, "uidlevel2" character(11), "idlevel3" integer, "uidlevel3" character(11), "idlevel4" integer, "uidlevel4" character(11));]; SQL state [XX001]; error code [0]; ERROR: could not read block 0 in file "base/16393/11909": read only 0 of 8192 bytes; nested exception is org.postgresql.util.PSQLException: ERROR: could not read block 0 in file "base/16393/11909": read only 0 of 8192 bytes
Azimi
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp
–
Knut Staring
Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar
–
Knut Staring
Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar
Hi All,
In case if anyone else faces similar issue again.
Try to find more information about the block,
SELECT oid, relname FROM pg_class WHERE oid=11909;
the result will be something like,
oid | relname
------±--------------------------------
11909 | pg_attribute_relid_attnum_index
then try to rebuild the index.
REINDEX INDEX pg_attribute_relid_attnum_index
hope this helps.