Обсуждение: Corrupted Dabatabase

Поиск
Список
Период
Сортировка

Corrupted Dabatabase

От
Pau Marc Muñoz Torres
Дата:
Hello Everydody, 

 My database is corrupted, each time i try to list all the tables in the database  i have got the following message

hla2db=> \d
ERROR:  could not open relation 1663/16385/1255: Read-only file system

I read that my best option is to use my backup. Before using my backup i would like to remove all databases in postgresql and create everything again from scratch. Unfortunatlly i can't see the list of databases, althought i am able to create databse



 can you suggest what to do? is it a good idea to reinstall postgresql?


Re: Corrupted Dabatabase

От
Tim Clarke
Дата:
The issue sounds more like your server than just Postgres - search the
net for "read only file system" for your OS.

Tim Clarke

On 27/06/16 14:28, Pau Marc Muñoz Torres wrote:
> Hello Everydody,
>
>  My database is corrupted, each time i try to list all the tables in
> the database  i have got the following message
>
> hla2db=> \d
> ERROR:  could not open relation 1663/16385/1255: Read-only file system
>
> I read that my best option is to use my backup. Before using my backup
> i would like to remove all databases in postgresql and create
> everything again from scratch. Unfortunatlly i can't see the list of
> databases, althought i am able to create databse
>
>
>
>  can you suggest what to do? is it a good idea to reinstall postgresql?
>
>
> Pau Marc Muñoz Torres
> skype: pau_marc
> http://www.linkedin.com/in/paumarc
> http://www.researchgate.net/profile/Pau_Marc_Torres3/info/
>



Вложения

Re: Corrupted Dabatabase

От
Alex Ignatov
Дата:

On 27.06.2016 16:28, Pau Marc Muñoz Torres wrote:
Hello Everydody, 

 My database is corrupted, each time i try to list all the tables in the database  i have got the following message

hla2db=> \d
ERROR:  could not open relation 1663/16385/1255: Read-only file system

I read that my best option is to use my backup. Before using my backup i would like to remove all databases in postgresql and create everything again from scratch. Unfortunatlly i can't see the list of databases, althought i am able to create databse



 can you suggest what to do? is it a good idea to reinstall postgresql?



May be you filesystem is mounted read-only after power loss or some OS crash?

What OS do you have   - WIndows or some kind of Unix (Linux,  etc). Also what  file system  Postgresql data dir is using?

Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Re: Corrupted Dabatabase

От
Pau Marc Muñoz Torres
Дата:
hi 

 thank you for your quick answer,
 

 I  am working with linux. here you have the output of uname --all


 
Linux XXX at 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

And the filesystem is ext3

 i was able to work with the database until last week when i was indexing the database. the problem came when i tried to cancel a \di command

 as far as i know nothing  changed since the last time  i was working last week.

p



2016-06-27 15:38 GMT+02:00 Alex Ignatov <a.ignatov@postgrespro.ru>:

On 27.06.2016 16:28, Pau Marc Muñoz Torres wrote:
Hello Everydody, 

 My database is corrupted, each time i try to list all the tables in the database  i have got the following message

hla2db=> \d
ERROR:  could not open relation 1663/16385/1255: Read-only file system

I read that my best option is to use my backup. Before using my backup i would like to remove all databases in postgresql and create everything again from scratch. Unfortunatlly i can't see the list of databases, althought i am able to create databse



 can you suggest what to do? is it a good idea to reinstall postgresql?



May be you filesystem is mounted read-only after power loss or some OS crash?

What OS do you have   - WIndows or some kind of Unix (Linux,  etc). Also what  file system  Postgresql data dir is using?

Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


Re: Corrupted Dabatabase

От
Larry Rosenman
Дата:

On 2016-06-27 08:52, Pau Marc Muñoz Torres wrote:

hi 
 
 thank you for your quick answer,
 
 
 I  am working with linux. here you have the output of uname --all
 
 
 
Linux XXX at 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
 

And the filesystem is ext3
 
 i was able to work with the database until last week when i was indexing the database. the problem came when i tried to cancel a \di command
 
 as far as i know nothing  changed since the last time  i was working last week.
 
 
 
Have you run fsck on the filesystem?  Is there any messages in /var/log/messages?
 
 
-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640                 E-Mail: ler@lerctr.org
US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281

Re: Corrupted Dabatabase

От
Adrian Klaver
Дата:
On 06/27/2016 06:52 AM, Pau Marc Muñoz Torres wrote:
> hi
>
>  thank you for your quick answer,
>
>
>  I  am working with linux. here you have the output of uname --all
>
>
>
> Linux XXX at 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011
> x86_64 x86_64 x86_64 GNU/Linux
>
> And the filesystem is ext3
>
>  i was able to work with the database until last week when i was
> indexing the database. the problem came when i tried to cancel a \di command

How did you cancel the command?

Also elaborate on what you mean by 'indexing the database'?

>
>  as far as i know nothing  changed since the last time  i was working
> last week.
>
> p
>
>
> Pau Marc Muñoz Torres
> skype: pau_marc
> http://www.linkedin.com/in/paumarc
> http://www.researchgate.net/profile/Pau_Marc_Torres3/info/
>
>
> 2016-06-27 15:38 GMT+02:00 Alex Ignatov <a.ignatov@postgrespro.ru
> <mailto:a.ignatov@postgrespro.ru>>:
>
>
>     On 27.06.2016 16:28, Pau Marc Muñoz Torres wrote:
>>     Hello Everydody,
>>
>>      My database is corrupted, each time i try to list all the tables
>>     in the database  i have got the following message
>>
>>     hla2db=> \d
>>     ERROR:  could not open relation 1663/16385/1255: Read-only file system
>>
>>     I read that my best option is to use my backup. Before using my
>>     backup i would like to remove all databases in postgresql and
>>     create everything again from scratch. Unfortunatlly i can't see
>>     the list of databases, althought i am able to create databse
>>
>>
>>
>>      can you suggest what to do? is it a good idea to reinstall
>>     postgresql?
>>
>>
>>     Pau Marc Muñoz Torres
>>     skype: pau_marc
>>     http://www.linkedin.com/in/paumarc
>>     http://www.researchgate.net/profile/Pau_Marc_Torres3/info/
>>
>
>     May be you filesystem is mounted read-only after power loss or some
>     OS crash?
>
>     What OS do you have   - WIndows or some kind of Unix (Linux,  etc).
>     Also what  file system  Postgresql data dir is using?
>
>     Alex Ignatov
>     Postgres Professional: http://www.postgrespro.com
>     The Russian Postgres Company
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Corrupted Dabatabase

От
"Sterpu Victor"
Дата:
You probably have a HDD problem.
Try a "cat /proc/mounts" and see if partition is mounted read only.
 
------ Original Message ------
From: "Pau Marc Muñoz Torres" <paumarc@gmail.com>
To: "pgsql general" <pgsql-general@postgresql.org>
Sent: 27/6/2016 4:28:35 PM
Subject: [GENERAL] Corrupted Dabatabase
 
Hello Everydody, 

 My database is corrupted, each time i try to list all the tables in the database  i have got the following message

hla2db=> \d
ERROR:  could not open relation 1663/16385/1255: Read-only file system

I read that my best option is to use my backup. Before using my backup i would like to remove all databases in postgresql and create everything again from scratch. Unfortunatlly i can't see the list of databases, althought i am able to create databse



 can you suggest what to do? is it a good idea to reinstall postgresql?


Re: Corrupted Dabatabase

От
Adrian Klaver
Дата:
On 06/27/2016 07:23 AM, Pau Marc Muñoz Torres wrote:

Please reply to list also.
Ccing list

> i did a cancel + c
>
>   i suppose this is the problem

I routinely do that with no problems.

Also elaborate on what you mean by 'indexing the database'?


>
> p
>
> Pau Marc Muñoz Torres
> skype: pau_marc
> http://www.linkedin.com/in/paumarc
> http://www.researchgate.net/profile/Pau_Marc_Torres3/info/
>
>
> 2016-06-27 16:09 GMT+02:00 Adrian Klaver <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>>:
>
>     On 06/27/2016 06:52 AM, Pau Marc Muñoz Torres wrote:
>
>         hi
>
>          thank you for your quick answer,
>
>
>          I  am working with linux. here you have the output of uname --all
>
>
>
>         Linux XXX at 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011
>         x86_64 x86_64 x86_64 GNU/Linux
>
>         And the filesystem is ext3
>
>          i was able to work with the database until last week when i was
>         indexing the database. the problem came when i tried to cancel a
>         \di command
>
>
>     How did you cancel the command?
>
>     Also elaborate on what you mean by 'indexing the database'?
>
>
>          as far as i know nothing  changed since the last time  i was
>         working
>         last week.
>
>         p
>
>
>         Pau Marc Muñoz Torres
>         skype: pau_marc
>         http://www.linkedin.com/in/paumarc
>         http://www.researchgate.net/profile/Pau_Marc_Torres3/info/
>
>
>         2016-06-27 15:38 GMT+02:00 Alex Ignatov
>         <a.ignatov@postgrespro.ru <mailto:a.ignatov@postgrespro.ru>
>         <mailto:a.ignatov@postgrespro.ru
>         <mailto:a.ignatov@postgrespro.ru>>>:
>
>
>             On 27.06.2016 16:28, Pau Marc Muñoz Torres wrote:
>
>                 Hello Everydody,
>
>                  My database is corrupted, each time i try to list all
>             the tables
>                 in the database  i have got the following message
>
>                 hla2db=> \d
>                 ERROR:  could not open relation 1663/16385/1255:
>             Read-only file system
>
>                 I read that my best option is to use my backup. Before
>             using my
>                 backup i would like to remove all databases in
>             postgresql and
>                 create everything again from scratch. Unfortunatlly i
>             can't see
>                 the list of databases, althought i am able to create databse
>
>
>
>                  can you suggest what to do? is it a good idea to reinstall
>                 postgresql?
>
>
>                 Pau Marc Muñoz Torres
>                 skype: pau_marc
>                 http://www.linkedin.com/in/paumarc
>                 http://www.researchgate.net/profile/Pau_Marc_Torres3/info/
>
>
>             May be you filesystem is mounted read-only after power loss
>         or some
>             OS crash?
>
>             What OS do you have   - WIndows or some kind of Unix
>         (Linux,  etc).
>             Also what  file system  Postgresql data dir is using?
>
>             Alex Ignatov
>             Postgres Professional: http://www.postgrespro.com
>             The Russian Postgres Company
>
>
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Corrupted Dabatabase

От
Pau Marc Muñoz Torres
Дата:
hello again

 to cancel the execution of the \di i used cntl+c, the output for the cat  /proc/mounts returns

/dev/mapper/ddf1_4c5349202020202010000055000000004711471100001e78p1 /home ext3 rw,data=ordered 0 0

i when i say i was indexing a table, i mean that i was executing a "create index"  command

p


2016-06-27 16:21 GMT+02:00 Sterpu Victor <victor@caido.ro>:
You probably have a HDD problem.
Try a "cat /proc/mounts" and see if partition is mounted read only.
 
------ Original Message ------
From: "Pau Marc Muñoz Torres" <paumarc@gmail.com>
To: "pgsql general" <pgsql-general@postgresql.org>
Sent: 27/6/2016 4:28:35 PM
Subject: [GENERAL] Corrupted Dabatabase
 
Hello Everydody, 

 My database is corrupted, each time i try to list all the tables in the database  i have got the following message

hla2db=> \d
ERROR:  could not open relation 1663/16385/1255: Read-only file system

I read that my best option is to use my backup. Before using my backup i would like to remove all databases in postgresql and create everything again from scratch. Unfortunatlly i can't see the list of databases, althought i am able to create databse



 can you suggest what to do? is it a good idea to reinstall postgresql?