Обсуждение: New Fedora 3 install gives: relation "pg_catalog.pg_user" does not exist

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

New Fedora 3 install gives: relation "pg_catalog.pg_user" does not exist

От
Steve Wampler
Дата:
I'm trying to install PG 7.4.6 (from Fedora rpms) and
keep getting stuck with psql refusing to do anything
useful.  As a simple example:

-----------------------------------
bash-3.00$ createdb postgres
CREATE DATABASE
bash-3.00$ psql
Welcome to psql 7.4.6, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
        \h for help with SQL commands
        \? for help on internal slash commands
        \g or terminate with semicolon to execute query
        \q to quit

postgres=# \l
ERROR:  relation "pg_catalog.pg_user" does not exist
-----------------------------------

The only reference I could find on this error all dealt
with copying a database, and suggested using REINDEX.
However, the instructions in REINDEX say that I have
to start a standalone server with the -P option.  This
option isn't documented (in the postgres man page)
and I cannot get pg_ctl to startup a server with
this option - it returns w/o error and no server is
running.

I don't see any errors when starting with
"service postgresql start" - and if I empty out
/var/lib/pgsql, the command initializes the database
with no errors.

Can someone give me some pointers on what I'm doing
wrong and what I can do to fix it?

Thanks!
Steve

--
Steve Wampler -- swampler@noao.edu
The gods that smiled on your birth are now laughing out loud.

Re: New Fedora 3 install gives: relation "pg_catalog.pg_user"

От
Steve Wampler
Дата:
Steve Wampler wrote:

> I don't see any errors when starting with
> "service postgresql start" - and if I empty out
> /var/lib/pgsql, the command initializes the database
> with no errors.

To add a bit more information, and correct the above.
I wasn't seeing any errors because PGLOG was set
to /dev/null in /etc/init.d/postgresql.  Changing
that to /var/lib/pgsql, clearing out /var/lib/pgsql,
and restarting gives:

--------------------------------------------------
bash-3.00$ cat /var/log/pgsql
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.

fixing permissions on existing directory /var/lib/pgsql/data... ok
creating directory /var/lib/pgsql/data/base... ok
creating directory /var/lib/pgsql/data/global... ok
creating directory /var/lib/pgsql/data/pg_xlog... ok
creating directory /var/lib/pgsql/data/pg_clog... ok
selecting default max_connections... 100
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in /var/lib/pgsql/data/base/1... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
creating information schema...
initdb: failed
bash-3.00$
---------------------------------------------------

So, initdb isn't completing.  Which explains the
error, but doesn't give me enough to figure out a
fix.  Ideas?

Thanks!
Steve
--
Steve Wampler -- swampler@noao.edu
The gods that smiled on your birth are now laughing out loud.

Re: New Fedora 3 install gives: relation "pg_catalog.pg_user" does not exist

От
Tom Lane
Дата:
Steve Wampler <swampler@noao.edu> writes:
> I'm trying to install PG 7.4.6 (from Fedora rpms) and
> keep getting stuck with psql refusing to do anything
> useful.

Are you running with SELinux enforcement mode on?  We've just isolated
some problems there --- see
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=143208

The quickest workaround is to "sudo /usr/sbin/setenforce 0", at least for
long enough to run initdb.

            regards, tom lane

Re: New Fedora 3 install gives: relation "pg_catalog.pg_user"

От
Steve Wampler
Дата:
Tom Lane wrote:
> Steve Wampler <swampler@noao.edu> writes:
>
>>I'm trying to install PG 7.4.6 (from Fedora rpms) and
>>keep getting stuck with psql refusing to do anything
>>useful.
>
>
> Are you running with SELinux enforcement mode on?  We've just isolated
> some problems there --- see
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=143208
>
> The quickest workaround is to "sudo /usr/sbin/setenforce 0", at least for
> long enough to run initdb.

Thanks, Tom - that was it!


--
Steve Wampler -- swampler@noao.edu
The gods that smiled on your birth are now laughing out loud.