pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedowner of type 'mmm' apperars to be invalid
6+ messages / 2 participants
[nested] [flat]
* owner of type 'mmm' apperars to be invalid
@ 2002-11-05 05:57 cristi <cristi@dmhi.ct.ro>
0 siblings, 1 reply; 6+ messages in thread
From: cristi @ 2002-11-05 05:57 UTC (permalink / raw)
To: pgsql-sql
When I'm trying to make pg_dump on a data base I have this message:
WARNING: owner of type 'mmm' apperars to be invalid
WARNING: owner of type 'eee' apperars to be invalid
WARNING: owner of type 'refcursor' apperars to be invalid
Where are these object and how can I destroy its?
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: owner of type 'mmm' apperars to be invalid
@ 2002-11-05 10:57 Richard Huxton <dev@archonet.com>
parent: cristi <cristi@dmhi.ct.ro>
0 siblings, 1 reply; 6+ messages in thread
From: Richard Huxton @ 2002-11-05 10:57 UTC (permalink / raw)
To: cristi <cristi@dmhi.ct.ro>; pgsql-sql
On Tuesday 05 Nov 2002 5:57 am, cristi wrote:
> When I'm trying to make pg_dump on a data base I have this message:
>
> WARNING: owner of type 'mmm' apperars to be invalid
> WARNING: owner of type 'eee' apperars to be invalid
> WARNING: owner of type 'refcursor' apperars to be invalid
>
> Where are these object and how can I destroy its?
richardh=> select oid,typname,typowner from pg_type where typname='refcursor';
oid | typname | typowner
------+-----------+----------
1790 | refcursor | 1
richardh=> select * from pg_user where usesysid=1;
usename | usesysid | usecreatedb | usetrace | usesuper | usecatupd | passwd
| valuntil
----------+----------+-------------+----------+----------+-----------+----------+----------
postgres | 1 | t | t | t | t |
I'd recommend you add a user with the required id, then dump the database and
fix the dump as required. The owner of "refcursor" should be postgres (or
whatever the system user is called) - if that user has been deleted, I'd be
surprised that's the only errors you get.
--
Richard Huxton
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: owner of type 'mmm' apperars to be invalid
@ 2002-11-05 13:03 cristi <cristi@dmhi.ct.ro>
parent: Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 6+ messages in thread
From: cristi @ 2002-11-05 13:03 UTC (permalink / raw)
To: pgsql-sql
It shouldn't be this the solution of the problem?
salt=# delete from pg_type where typname='refcursor';
DELETE 1
salt=# delete from pg_type where typname='eee';
DELETE 1
salt=# delete from pg_type where typname='mmm';
DELETE 1
Now, I don't have the error message!
Mr.Richard Huxton, thank you very much!
Cristi
On Tuesday 05 Nov 2002 11:55 am, cristi wrote:
> I'm in this situation:
>
> salt=# select oid,typname,typowner from pg_type where typname='refcursor';
> oid | typname | typowner
> ----------+-----------+----------
> 13701973 | refcursor | 0
> (1 row)
>
> salt=# select * from pg_user where usesysid=0;
> usename | usesysid | usecreatedb | usetrace | usesuper | usecatupd |
> passwd
> (0 rows)
Hmm - try the following (it should show the 5 users with lowest number - the
first should be 'postgres').
SELECT * FROM pg_user ORDER BY usesysid limit 5;
> 1)Which is the user with the required id in my case?
> 2)How can I add a user with the required id?(the command)
Hmm - assuming the query above is good, I'd change "typowner" in "pg_type"
instead. Also the following should all display the same typowner (but we
know
there is a problem with refcursor). That typowner should be the postgres
user.
SELECT typname,typowner FROM pg_type WHERE typname LIKE 'r%';
--
Richard Huxton
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: owner of type 'mmm' apperars to be invalid
@ 2002-11-05 13:21 Richard Huxton <dev@archonet.com>
parent: cristi <cristi@dmhi.ct.ro>
0 siblings, 1 reply; 6+ messages in thread
From: Richard Huxton @ 2002-11-05 13:21 UTC (permalink / raw)
To: cristi <cristi@dmhi.ct.ro>; pgsql-sql
On Tuesday 05 Nov 2002 1:03 pm, cristi wrote:
> It shouldn't be this the solution of the problem?
>
> salt=# delete from pg_type where typname='refcursor';
> DELETE 1
> salt=# delete from pg_type where typname='eee';
> DELETE 1
> salt=# delete from pg_type where typname='mmm';
> DELETE 1
>
> Now, I don't have the error message!
>
> Mr.Richard Huxton, thank you very much!
But - you have deleted the "refcursor" type which is not a good idea! If you
don't use cursors you might get away with it, but I'd be nervous about it.
If you create a new database does it contain the refcursor type? If so, drop
and recreate the database, restoring the data to it. If not, I think you'll
need to restore the template1 db - there's an article on
techdocs.postgresql.org about this (byJosh IIRC).
--
Richard Huxton
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: owner of type 'mmm' apperars to be invalid
@ 2002-11-05 14:32 cristi <cristi@dmhi.ct.ro>
parent: Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 6+ messages in thread
From: cristi @ 2002-11-05 14:32 UTC (permalink / raw)
To: pgsql-sql
On Tuesday 05 Nov 2002 1:03 pm, cristi wrote:
> It shouldn't be this the solution of the problem?
>> salt=# delete from pg_type where typname='refcursor';
>> DELETE 1
>> Now, I don't have the error message!
> >Mr.Richard Huxton, thank you very much!
>But - you have deleted the "refcursor" type which is not a good idea! If
you
>don't use cursors you might get away with it, but I'd be nervous about it.
>If you create a new database does it contain the refcursor type?
Ooo!!!!
Yes, I see...
You right.
>If so, drop and recreate the database, restoring the data to it. If not, I
think you'll
>need to restore the template1 db - there's an article on
>techdocs.postgresql.org about this (byJosh IIRC).
Would you give me the URL address for this article?
Please!
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: owner of type 'mmm' apperars to be invalid
@ 2002-11-05 14:51 Richard Huxton <dev@archonet.com>
parent: cristi <cristi@dmhi.ct.ro>
0 siblings, 0 replies; 6+ messages in thread
From: Richard Huxton @ 2002-11-05 14:51 UTC (permalink / raw)
To: cristi <cristi@dmhi.ct.ro>; pgsql-sql
On Tuesday 05 Nov 2002 2:32 pm, cristi wrote:
> On Tuesday 05 Nov 2002 1:03 pm, cristi wrote:
> >But - you have deleted the "refcursor" type which is not a good idea! If
> Ooo!!!!
> Yes, I see...
> You right.
>
> >If so, drop and recreate the database, restoring the data to it. If not, I
> think you'll
> >need to restore the template1 db - there's an article on
> >techdocs.postgresql.org about this (byJosh IIRC).
>
> Would you give me the URL address for this article?
> Please!
It's "Adventures in PostgreSQL, Episode 1 by Josh Berkus"
at http://techdocs.postgresql.org/
Loads of other good stuff there too.
Might not be necessary though - if the template1 db contains the refcursor
type definition then you just need to drop and recreate the problem database.
--
Richard Huxton
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2002-11-05 14:51 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-05 05:57 owner of type 'mmm' apperars to be invalid cristi <cristi@dmhi.ct.ro>
2002-11-05 10:57 ` Richard Huxton <dev@archonet.com>
2002-11-05 13:03 ` cristi <cristi@dmhi.ct.ro>
2002-11-05 13:21 ` Richard Huxton <dev@archonet.com>
2002-11-05 14:32 ` cristi <cristi@dmhi.ct.ro>
2002-11-05 14:51 ` Richard Huxton <dev@archonet.com>
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