pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marc Sherman <msherman@projectile.ca>
Cc: pgsql-admin@postgresql.org, "Oliver Elphick" <olly@lfix.co.uk>
Subject: Re: WARNING: owner of type appears to be invalid?
Date: Wed, 23 May 2001 16:16:29 -0400
Message-ID: <17300.990648989@sss.pgh.pa.us> (raw)
In-Reply-To: <NFBBIHBOMKCAGGHPKDJHCEFBCEAA.msherman@projectile.ca>
References: <NFBBIHBOMKCAGGHPKDJHCEFBCEAA.msherman@projectile.ca>

"Marc Sherman" <msherman@projectile.ca> writes:
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
>> Sounds like you have no pg_shadow entry for the postgres user.

> No, that's not it:

> template1=# select * from pg_shadow;
>  usename  | usesysid | usecreatedb | usetrace | usesuper | usecatupd |
> passwd | valuntil
> ----------+----------+-------------+----------+----------+-----------+------
> --+----------
>  postgres |       31 | t           | t        | t        | t         |
> |
>  msherman |     1000 | t           | f        | f        | f         |
> |
>  www-data |       33 | f           | f        | f        | f         |
> |
> (3 rows)

> This is strange, though -- the problem types have typowner set
> to 103 in pg_type, which is clearly invalid.  103 happens to be
> the Linux user ID (in passwd) for the postgres user.  Strange.

> I suspect this may be a problem with the Debian install scripts;
> Debian is forcing postgres' user id to be 31 in the db, since it
> used to use a reserved user id for postgres in the os.

Either that or a bug in initdb: it *should* substitute the same ID into
postgres' pg_shadow entry as it does into the owner columns of the
template1 system catalogs.  Maybe it's getting confused.  Oliver,
any thoughts?

> Is it enough for me to log on to each of my databases as user
> postgres, and execute the query "update pg_type set typowner=31
> where typowner=103;" to fix this problem?  Are there any other
> hidden databases I should fix besides template1?

Aside from pg_type, you probably have bogus values in the owner columns
for pg_class, pg_function, pg_operator, etc etc.  It'd be a lot easier
to create another user with sysid = 103 ...

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <17300.990648989@sss.pgh.pa.us>
Permalink:  ../17300.990648989@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17300.990648989@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, msherman@projectile.ca, olly@lfix.co.uk
  Subject: Re: WARNING: owner of type appears to be invalid?
  In-Reply-To: <17300.990648989@sss.pgh.pa.us>
  References: <NFBBIHBOMKCAGGHPKDJHCEFBCEAA.msherman@projectile.ca> <17300.990648989@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox