Обсуждение: Re: [GENERAL] pg_database corrupted(?) If so, what do I do????

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

Re: [GENERAL] pg_database corrupted(?) If so, what do I do????

От
"Jonny Hinojosa"
Дата:
No, but I have tried to figure out how to do just that.  I have found no way
to effect these updates.  So which part of the docs did I sleep through???

All help is GREATLY appreciated.

Jonny

-----Original Message-----
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Jonny Hinojosa <Jonny@TCA.net>; PostgreSQL General
<pgsql-general@postgreSQL.org>
Date: Tuesday, May 11, 1999 4:30 AM
Subject: RE: [GENERAL] pg_database corrupted(?) If so, what do I do????


At 22:26 +0300 on 10/05/1999, Jonny Hinojosa wrote:


> The last 2 entries have been corrupted.  How do I (can I) correct these
> entries ??????

Have you tried logging into psql (template1) as postgres and updating the
pg_database table?

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma




Re: [GENERAL] pg_database corrupted(?) If so, what do I do????

От
Herouth Maoz
Дата:
At 18:03 +0300 on 11/05/1999, Jonny Hinojosa wrote:


> No, but I have tried to figure out how to do just that.  I have found no way
> to effect these updates.  So which part of the docs did I sleep through???
>
> All help is GREATLY appreciated.

I can't test any advice I give on my own system, as it is used for
production. But let's see if we can do something.

If you tried to update the pg_database with UPDATE pg_database SET
datpath=datname WHERE datpath <> datname; and it didn't work, you may try
the following:

make a copy of the hom and cdmwhere directories in the data directory, for
backup.

Try to DROP DATABASE on the above databases. See if they have disappeared
from the database list (you can use select * from pg_database instead of
psql -l if you are already in psql). If they did, remove or rename the hom
and cdmwhere directories, and re-create them, using the user.

You are now supposed to have two new empty databases with the old names.
Remove the newly created directories and rename the old ones back. Check to
see if you can connect.

It may be advisable to shut down the postmaster when you are changing
things in the data directory, and restart it for the next psql session.

Now, supposed the DROP DATABASE didn't work, and complains that it doesn't
find the directories. Then, if it were me, I would create copies of the
original hom and cdmwhere directories, but give them the names that appear
in the pg_database table (check to see if there are extra spaces there,
though). You can give names that contain spaces in unix, it's no problem.
And then I'd try the drop again.

I hope any of these suggestions helps. Just make sure you have a backup
copy of the directories somewhere safe.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma