Обсуждение: Hard drive failure leads to corrupt db

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

Hard drive failure leads to corrupt db

От
"Brusser, Michael"
Дата:
Our customer reported a problem resulting from the hard drive failure.
Database server would not start, generating this message: PANIC: The database cluster was initialized with LC_COLLATE
'en_US.ISO8859-1', which is not recognized by setlocale(). It looks like you need to initdb.

They are running v.7.3.2 on Solaris, where all locale parameters are set
to "C".
Is there anything we can do to restore the database without data loss?

Thank you,
Michael.


Re: Hard drive failure leads to corrupt db

От
"Brusser, Michael"
Дата:
Just occurred to me: perhaps we don't have a database corruption,
instead after replacement of the boot drive the locale on the host
changed from
en_US.ISO8859-1 to 'C'

Still I am not sure what to do. Is changing the locale back to
en_US.ISO8859-1
the right thing to do now?

Mike.

-----Original Message-----

Our customer reported a problem resulting from the hard drive failure.
Database server would not start, generating this message: PANIC: The database cluster was initialized with LC_COLLATE
'en_US.ISO8859-1', which is not recognized by setlocale(). It looks like you need to initdb.

They are running v.7.3.2 on Solaris, where all locale parameters are set
to "C".
Is there anything we can do to restore the database without data loss?

Thank you,
Michael.



Re: Hard drive failure leads to corrupt db

От
Peter Eisentraut
Дата:
Brusser, Michael wrote:
> Our customer reported a problem resulting from the hard drive
> failure. Database server would not start, generating this message:
>   PANIC: The database cluster was initialized with LC_COLLATE
> 'en_US.ISO8859-1',
>   which is not recognized by setlocale().

The issue is that the operating system does not recognize that locale 
name.  Perhaps you need to install some extra packages to get the full 
locale support.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


Re: Hard drive failure leads to corrupt db

От
Martijn van Oosterhout
Дата:
Your problem is that your database was initialised with locale
'en_US.ISO8859-1' but your system no longer recognises it. You need to
create the locale somehow. On Linux it's /etc/locale.gen but you should
probably search the locale manpage for how to do it on Solaris.

Changing the locale requires a pg_dump and restore...

Hope this helps,

On Tue, Sep 13, 2005 at 08:49:23AM -0400, Brusser, Michael wrote:
> Just occurred to me: perhaps we don't have a database corruption,
> instead after replacement of the boot drive the locale on the host
> changed from
> en_US.ISO8859-1 to 'C'
>
> Still I am not sure what to do. Is changing the locale back to
> en_US.ISO8859-1
> the right thing to do now?
>
> Mike.
>
> -----Original Message-----
>
> Our customer reported a problem resulting from the hard drive failure.
> Database server would not start, generating this message:
>   PANIC: The database cluster was initialized with LC_COLLATE
> 'en_US.ISO8859-1',
>   which is not recognized by setlocale().
>   It looks like you need to initdb.
>
> They are running v.7.3.2 on Solaris, where all locale parameters are set
> to "C".
> Is there anything we can do to restore the database without data loss?
>
> Thank you,
> Michael.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Re: Hard drive failure leads to corrupt db

От
Tom Lane
Дата:
Peter Eisentraut <peter_e@gmx.net> writes:
> Brusser, Michael wrote:
>> Our customer reported a problem resulting from the hard drive
>> failure. Database server would not start, generating this message:
>> PANIC: The database cluster was initialized with LC_COLLATE
>> 'en_US.ISO8859-1',
>> which is not recognized by setlocale().

> The issue is that the operating system does not recognize that locale 
> name.  Perhaps you need to install some extra packages to get the full 
> locale support.

Yes.  The database definitely was in en_US.ISO8859-1 locale, even if you
thought otherwise.  That information comes from inside the pg_control
file, which is CRC-checked, so it's highly unlikely that corruption of
pg_control would have resulted in this message.  I think it's much more
likely that you lost the files that setlocale needs to define this
locale.
        regards, tom lane