Обсуждение: Postgresql.conf getting corrupted

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

Postgresql.conf getting corrupted

От
"Jason K. Ergle"
Дата:

I am having a problem with postgreql.conf becoming corrupted.  We are using version 8.2.9 in embedded systems running Fedora Core 7.  Basically, the postgres server holds the data that our embedded systems need to run.  They are all using industrial solid state disk drives on the ext3 file system.  The systems are cold booted occasionally by the operators if something becomes unresponsive.  I am not having a problem with the actual database, but it seems as though the postgresql.conf file becomes corrupted on occasion.   What happens is a random character in the file, such as an = will be replaced with another character, such as a 5.  Then the server refuses to start because of a syntax error in the file.

 

This is confusing to me, as I would expect the configuration file to only be read and startup, and never to be written too.  Thus far we have not had any software or data systems become corrupted, but the configuration file has become corrupted on 3 separate systems thus far.  Does anyone have any idea how/why this is happening?  Or what I may do to prevent it?  I understand that cold booting is bad for the systems, but that’s a reality of types of systems we are installing, so I have to deal with it.

 

Thanks,

Jason

Re: Postgresql.conf getting corrupted

От
Alvaro Herrera
Дата:
Jason K. Ergle wrote:
> I am having a problem with postgreql.conf becoming corrupted.  We are using
> version 8.2.9 in embedded systems running Fedora Core 7.  Basically, the
> postgres server holds the data that our embedded systems need to run.  They
> are all using industrial solid state disk drives on the ext3 file system.
> The systems are cold booted occasionally by the operators if something
> becomes unresponsive.  I am not having a problem with the actual database,
> but it seems as though the postgresql.conf file becomes corrupted on
> occasion.   What happens is a random character in the file, such as an =
> will be replaced with another character, such as a 5.  Then the server
> refuses to start because of a syntax error in the file.

That's pretty weird.  Are you using something like pgadmin to change the
server's configuration?  The config file is not opened for writing
normally.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Re: Postgresql.conf getting corrupted

От
Tom Lane
Дата:
"Jason K. Ergle" <jason.ergle@camotion.com> writes:
> I am having a problem with postgreql.conf becoming corrupted.  We are using
> version 8.2.9 in embedded systems running Fedora Core 7.  Basically, the
> postgres server holds the data that our embedded systems need to run.  They
> are all using industrial solid state disk drives on the ext3 file system.
> The systems are cold booted occasionally by the operators if something
> becomes unresponsive.  I am not having a problem with the actual database,
> but it seems as though the postgresql.conf file becomes corrupted on
> occasion.   What happens is a random character in the file, such as an =
> will be replaced with another character, such as a 5.  Then the server
> refuses to start because of a syntax error in the file.

I'd bet lunch you have bad RAM that's dropping a bit every so often.
It's worthy of note that ASCII '=' is 0x3D while '5' is 0x35, just
one bit different.

            regards, tom lane