Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-15 Thread Marc G. Fournier
On Sat, 15 Jan 2005, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: which there are more then 3 attributes ... but, of course, there is nothing for the one I just manually added to pg_class ... should this just be duplicated for 5773277? No, just do update pg_attribute set a

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-15 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > which there are more then 3 attributes ... but, of course, there is > nothing for the one I just manually added to pg_class ... should this just > be duplicated for 5773277? No, just do update pg_attribute set attrelid = 5773277 where attr

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-15 Thread Marc G. Fournier
On Sat, 15 Jan 2005, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: belay that one ... my error, wasn't doin ghte reindex right ... fixed the pg_class issue, but still have one with the email table itself in multi-user: restore=# select * from email; ERROR: catalog is missing 3 at

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-15 Thread Marc G. Fournier
nope ... still get it ... I can do a 'select' from the -O -P backend (what I refer to as single user mode), but not from a normal start up (ie. not pg_dumpable) ... # select * from email; ERROR: catalog is missing 3 attribute(s) for relid 5773277 'k, in pg_attribute, I find the following for t

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-15 Thread Marc G. Fournier
belay that one ... my error, wasn't doin ghte reindex right ... fixed the pg_class issue, but still have one with the email table itself in multi-user: restore=# select * from email; ERROR: catalog is missing 3 attribute(s) for relid 5773277 but, have an idea I'm going to try one that one ... O

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-15 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > belay that one ... my error, wasn't doin ghte reindex right ... fixed the > pg_class issue, but still have one with the email table itself in > multi-user: > restore=# select * from email; > ERROR: catalog is missing 3 attribute(s) for relid 5773

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-15 Thread Marc G. Fournier
On Sat, 15 Jan 2005, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: Hrmmm ... how about if I pg_dump --oids pg_class, make the modes and then reload it as opg_class, shut down the database server and move opg_class over pg_class, after making the required modifications to opg_class?

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-15 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > backend> reindex pg_class; > ERROR: syntax error at or near "pg_class" at character 9 "reindex table pg_class", I think. And you'll probably need to be doing this in a backend started with -P command line option. regards,

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-15 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > Hrmmm ... how about if I pg_dump --oids pg_class, make the modes and then > reload it as opg_class, shut down the database server and move opg_class > over pg_class, after making the required modifications to opg_class? Good idea. Give it a shot.

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-15 Thread Marc G. Fournier
On Sat, 15 Jan 2005, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: can I force the reuse of an OID? for instance, if I were to get the map'ngs for those toast files, and then 'drop' the old database (I've got several backups of it already), can I insert those records into pg_class

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-15 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > can I force the reuse of an OID? for instance, if I were to get the > map'ngs for those toast files, and then 'drop' the old database (I've got > several backups of it already), can I insert those records into pg_class, > with the proper OID? I

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-15 Thread Marc G. Fournier
On Sat, 15 Jan 2005, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: Is there something in the 'table file' itself that is holding that relid? Oh, drat, you're right --- TOAST pointer datums contain the OID of the toast file they are pointing to. So any value wide enough to be pushe

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-15 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > Is there something in the 'table file' itself that is holding that relid? Oh, drat, you're right --- TOAST pointer datums contain the OID of the toast file they are pointing to. So any value wide enough to be pushed out-of-line is going to have a

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-15 Thread Marc G. Fournier
On Fri, 14 Jan 2005, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: 'k, this is looking promising ... but I'm a bit confused on the TOAST tables ... I can't match on 'relname', since they aren't the same ... the old has, for instance: pg_toast_5773565 while the new has: pg_toast_

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-14 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > 'k, this is looking promising ... but I'm a bit confused on the TOAST > tables ... I can't match on 'relname', since they aren't the same ... the > old has, for instance: > pg_toast_5773565 > while the new has: > pg_toast_8709712 > is there som

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-14 Thread Marc G. Fournier
On Fri, 14 Jan 2005, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: course that won't work, since its link'd to the oid of the table name :( whose idea was this "let's name the files by the OID" again? :( Actually, I think you can make this work, if you are sure of the schema of the

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-14 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > course that won't work, since its link'd to the oid of the table name :( > whose idea was this "let's name the files by the OID" again? :( Actually, I think you can make this work, if you are sure of the schema of the old database. Try something l

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-14 Thread Marc G. Fournier
On Fri, 14 Jan 2005, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: course that won't work, since its link'd to the oid of the table name :( Not to mention all the other system catalogs. You could maybe make this idea work by regenerating the entire catalog set, but not by regenera

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-14 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > course that won't work, since its link'd to the oid of the table name :( Not to mention all the other system catalogs. You could maybe make this idea work by regenerating the entire catalog set, but not by regenerating just pg_attribute. But if y

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-14 Thread Marc G. Fournier
course that won't work, since its link'd to the oid of the table name :( whose idea was this "let's name the files by the OID" again? :( On Fri, 14 Jan 2005, Marc G. Fournier wrote: On Thu, 13 Jan 2005, Tom Lane wrote: I'm still searching the 'net to see if there is somethign that I've overlooked

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-14 Thread Marc G. Fournier
On Thu, 13 Jan 2005, Tom Lane wrote: I'm still searching the 'net to see if there is somethign that I've overlooked ... but everything so far is drawing a deadend ... can someone suggest a web page I should read, a tool I could use, or something, to get the data out of this, that I'm not finding?

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-14 Thread Marc G. Fournier
On Thu, 13 Jan 2005, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: What the client did was a 'delete from pg_attribute where ... ' ... [ blink... ] Well, that sort of thing is definitely a candidate for the Darwin Award, but what exactly was the WHERE clause? We were working on re

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-13 Thread Mark Kirkwood
Marc, In case you don't work out a better way to sort this, I can reproduce and fix the error 'catalog is missing n attribute(s) for relid 16396' caused by directly deleting (part of) pg_attribute: Setup : $ initdb $ pg_ctl start $ createdb test Backup : $ pg_ctl stop $ tar -czvf pgdata.tar.gz pgda

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid

2005-01-13 Thread Mark Kirkwood
Marc G. Fournier wrote: What the client did was a 'delete from pg_attribute where ... ' ... The database is a 7.4.2 one ... my first thought was one of the older standbys ... rebuild the schema and move the data files into place over top of that ... but of course, 7.3 and beyond are OID based vs

Re: [HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-13 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > What the client did was a 'delete from pg_attribute where ... ' ... [ blink... ] Well, that sort of thing is definitely a candidate for the Darwin Award, but what exactly was the WHERE clause? > The database is a 7.4.2 one ... my first thought was

[HACKERS] FATAL: catalog is missing 1 attribute(s) for relid 16396

2005-01-13 Thread Marc G. Fournier
Did some searching, and figured/concluded that things are pretty much hosed ... the last backup is from June (clients machine, not ours), but before I suggest going back to that backup, I want to make sure that I haven't overlooked anything ... What the client did was a 'delete from pg_attribut