[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Rebuild PostgreSQL 'cobalt' database



>On Thu, 5 Jun 2003, Bo von Hohenlohe wrote:
>
>> >On Wed, 4 Jun 2003, Bo von Hohenlohe wrote:
>> >
>> >> RE: Rebuild PostgreSQL 'cobalt' database
>> >>
>> >> 1) Before I Rebuild PostgreSQL 'cobalt' database I tried to check my data
>> >> base for errors per
>> >> http://list.cobalt.com/pipermail/cobalt-users/2002-December/082670.html :
>> >>
>> >> su - postgres
>> >> psql cobalt
>> >> SELECT * FROM quota;
>> >>
>> >> 2) I get:
>> >>
>> >> [root@ns1 /root]# su - postgres
>> >> [postgres@ns1 pgsql]$ psql cobalt
>> >> Connection to database 'cobalt' failed.
>> >> fe_sendauth: no password supplied
>> >
>> >did you change pg_hba.conf
>> >#local cobalt crypt
>> >local all trust
>> >
>> >> Where can I find the password for the cobalt data base? The password for
>> >> admin/root does not work.
>>
>>
>> >
>> >the password is in /etc/cobalt/.meta.id
>> >But you shouldn't need it if you changed
>> >did you change pg_hba.conf
>> >
>> >Make sure you change it back when you are finished
>> >
>> >Gerald
>> >--
>>
>>
>>
>> Attention Gerald:
>>
>> 1) I have been receiving a message from admin. Here is one line:
>> NOTICE:  Index pg_attribute_attrelid_index: NUMBER OF INDEX' TUPLES (592)
>> IS NOT THE SAME AS HEAP' (583) Please confirm that this indicates the need
>> to rebuild the cobalt data base.
>
>  Yes, this usually is due to a corrupted quota table.
>
>> 2) ValueWeb/Affinity where I lease my servers want to charge me $150 to
>> rebuild the data base, which is nuts, so I must attempt to do it myself. If
>> the rebuild fails I want to be assured that I can reverse the process. What
>> is the procedure for restoring the original (although corrupted) database?
>
>  When you dump the database make a backup of the dump file.
>  Then you can always import the backup to restore the cobalt database
>
>> 3)  I am rebuilding the data base on my RaQ3, where the path is
>> /home/pgsql, but on my RaQ4  /home/pgsql does not exist. Where is the
>> directory I need to be in on my RaQ4?
>
>  On a RaQ4, and 550 it is in /var/lib/pgsql/
>  The real files are in /var/lib/pgsql/data
>
>> 4) Please clarify these commands:
>> At "cobalt=>" prompt type "SELECT * FROM quota;" and press Enter.
>> How do I get "At "cobalt=>"?
>
>
>  psql cobalt
>
>
>> 5) Other instructions I found on the net recommend that one should comment
>> out rather than deleting the following. What is the best thing to do?
>>
>> REMOVE THE QUOTA STUFF (SINCE IT'S BROKEN ANYWAY):
>> - -  Edit 'cobalt-schema' and remove the 'CREATE TABLE "quota" ( );"
>
>  As long as you have the backup, go ahead and delete them.
>
>
>> section (spread over 2-3 lines)
>> - -  Remove the 'COPY "quota" FROM stdin;' line (end of schema file)
>> - -  Exit editor and save changes
>
>  I am not sure this is necessary.
>  last time I tried it, (yestereday on an XTR) I got errors.
>  so I left it in and it worked OK.
>  Maybe a postgre guru can comment on this!
>
>
>> 6) Here is your script I found at
>> http://list.cobalt.com/pipermail/cobalt-users/2002-December/082670.html
>> Would you please confirm integrity.
>
>  I use http://www.raqware.com/how2.html#fix-postgre
>  This was found on the Inet and I made some additions
>
>  I have never used the procedure you posted, so I really
>  can't comment on it....
>
>Gerald




OK. Thank you Gerald and Bruce.

The instructions at http://www.raqware.com/how2.html#fix-postgre are very
clear.

If the Rebuild Postgre fails is the following the right script to restore
data base from cobalt.dump.bak?

destroydb cobalt
OR (RaQ4+) dropdb cobalt
createdb cobalt
psql cobalt < cobalt.dump

Thanks again.