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

Re: [cobalt-users] RAQ4-postgres/gui errors and rebuild



> I know my postgres DB is broken, I get the active monitor errors on
the
> disk space page(Internal error) and I get two different errors,
swatch
> gives this is the postgres log:
>
> 030604.01:15:02.623  [1976] ERROR:  quota: Permission denied.
> 030604.01:15:03.272  [1976] ERROR:  quota: Permission denied.
> 030604.01:15:03.293  [1976] ERROR:  Relation 'quota' already exists
>
> And the weekly vacuum fails with the following:
>
> NOTICE:  Index users_pkey: NUMBER OF INDEX' TUPLES (51) IS NOT THE
SAME
> AS HEAP' (72).
> Recreate the index.
> ERROR:  Cannot insert a duplicate key into unique index users_pkey
>
>
> I snagged Bruce's instructions for rebuilding from this message:
>
>
http://list.cobalt.com/pipermail/cobalt-users/2002-December/082670.html
>
> The problem is, I don't think it is the quota table that is broken,
as
> when I run the check in the first part of the procedure, I get the
> following:
>
> cobalt=# SELECT * FROM quota;
>  type | name | total | free | used | percent | modify
> ------+------+-------+------+------+---------+--------
> (0 rows)
>
>
> Although it is not an error, 0 rows is probably not right either.
So my
> question is, should I go ahead with the quota rebuild as per the
> instructions, or is it something else I should be looking at?
>
> FWIW, I have also done the meta-verify stuff and it all comes out
clean.
> Thanks in advance!
>

It seems liek if you just delete the entire database and rebuild it,
that should fix the problem.
I've done that before usign the instructions at the url below and it
works.
http://list.cobalt.com/pipermail/cobalt-users/2002-January/062036.html
>>
- Logged in as root
- Backed up all data in /var/lib/pgsql/data (just in case)
- Deleted all content under /var/lib/pgsql/data
- Switched to postgres user (# su postgres)
- Executed the PostgreSQL initdb command to initiate a fresh data
structure
in the same location: # initdb -D /var/lib/pgsql/data
- Switched back to root
- Started PostgreSQL server:
    /etc/rc.d/init.d/postgresql stop
# /etc/rc.d/init.d/postgresql start
- Used the cobalt meta-verify script to reinstate the data in the
database:
# cd /usr/local/sbin
# ./meta-verify -si
Answer yes to all questions   uppercase Y
#./meta-verify -sa
Answer yes to all questions
#./meta-verify -ui
Answer yes to all questions
 #./meta-verify -ua
Answer yes to all questions
# /usr/local/sbin/swatch
<<



----
Ken Marcus
Precision Web Hosting
mailto:ken@xxxxxxxxxxxxxxxx
http://www.precisionweb.net