Thread: Postgresql 'backend closed the channelunexpectedly' - how to re-install?

Postgresql 'backend closed the channelunexpectedly' - how to re-install?

From
"Jim Byrne (NTL)"
Date:
Hi,

I have a raq3 - which uses postgresql to hold the information for the web
prefs GUI - but the database now seems to be corrupted; I have no user or
site data in my browser GUI.

I tried running meta-verify-raq3 for fixing a broken GUI, but the database
does not seem to be capable of processing any commands. Among other things,
it gives me the following feedback:

"checking system+database coherency...
META getall - FAIL: pqReadData() -- backend closed the channel
unexpectedly. This probably means the backend terminated
abnormally before or while processing the request.
database | 0
system | 61
total | 61
valid | 0
invalid | 61

verifying 0 VALID user(s)..."

I had a look at the database but although I can login, all commands give the
same error message about the 'backend closing the channel' unexpectedly. It
looks like the database itself is corrupted, and not just the data."

I have spent a lot of time looking for fixes to this problem - without
success. It looks to me as if I need to re-install the database?

Would the following be the way to do it:

Download the following onto the raq3,

ftp://ftp.cobaltnet.com/pub/products/raq3/RPMS/postgresql-devel-6.5.2-C2.i38
6.rpm

and

ftp://ftp.cobaltnet.com/pub/products/raq3/RPMS/postgresql-6.5.2-C2.i386.rpm

delete the existing PostgreSQl and install it using the above rpms. Then use
the meta-verify to populate the database with the prefs?

I will have to assume that the rpms will install in the correct
directory and that no other settings are required.

Does anyone on the list have experience of installing the Posgresql database
on a raq3 - do the above sound as if it would work?

Thanks,
Jim



Re: Postgresql 'backend closed the channelunexpectedly' - how to re-install?

From
Tom Lane
Date:
"Jim Byrne (NTL)" <james.byrne2@ntlworld.com> writes:
> I had a look at the database but although I can login, all commands give the
> same error message about the 'backend closing the channel' unexpectedly. It
> looks like the database itself is corrupted, and not just the data."

Ugh.  The failing backend process is probably dropping a core file in
the database directory --- can you get us a debugger stack trace from
the core file?

> I have spent a lot of time looking for fixes to this problem - without
> success. It looks to me as if I need to re-install the database?

Reinstalling the rpms would only help if the executable files got
corrupted, which is conceivable but not very likely.  (You may as well
try it though.)  The more likely bet is data file corruption, which you
may not be able to get out, of short of initdb and reload-all-the-data.
Unfortunately I have no idea what data the Cobalt GUI expects to find in
that database, or whether their "meta-verify" tool is capable of
rebuilding from an empty database.  You're probably going to have to ask
the Cobalt folks for help.

            regards, tom lane