Thread: Wierd Error on update
Hi All, I am relative PostGres newbie, so if there is a simple answer to this question, please feel free to send me a link or explaination. I am running Postgres 7.3 on a intel Linux Redhat 7.3 base. I am getting two errors which are a bit confounding. ERROR: pg_class_aclcheck:relation 474653086 not found on one table within a large SQL file update (+5000 lines with documentation) that needs to be run from the command line. Both statements are multiline Update statements. This is straight SQL, not function code. Now I can guareentee that the queries refer to an existing table, but the table is being rebuilt in the core of the long SQL update. The table in question now has all permissions (my attempt to get fixed, but that did not help). Interesting aspect to this problem is that if your run the large update in one file, and then run the two update statements in a second file it works fine. Now I placed the erroring statements at the end of the large file to make sure it was not a ordering error, but that didnt help. Any ideas? Thank you Thomas Seeber
Thomas Seeber <thomas.seeber@gmail.com> writes: > I am running Postgres 7.3 on a intel Linux Redhat 7.3 base. Original 7.3 release, or (I hope) 7.3.something? > I am getting two errors which are a bit confounding. > ERROR: pg_class_aclcheck:relation 474653086 not found Are there any views involved? Is the statement invoking any functions? How about triggers? Foreign keys? Rules? Also, is it always the same number in the error, or does that change from run to run? The problem looks a bit like a corrupted rule or view, but I'm not entirely sure how one would get involved in a simple UPDATE. regards, tom lane
> Original 7.3 release, or (I hope) 7.3.something? Red Hat 7.3.2.96-113Linux Version 2.4.20-20.7custom from cat /proc/version > > I am getting two errors which are a bit confounding. > > ERROR: pg_class_aclcheck:relation 474653086 not found > > Are there any views involved? No views. Is the statement invoking any functions? The statement is not invoking any fuctions However heres the statements, UPDATE school_info_l SET ind_default_data = 't'; UPDATE school_info_l SET sis_system_id = 9 where school_id IN (492, 434, 436); which are amazingly simple. Both queries return the same exact error, same error. not your > How about triggers? Foreign keys? Rules?Neither of the updates touch any rules. sis_system_id has a foreign key constaint to another table that does in it contain a value of 9 for sis_system_id in that table, but the first isnt touching anything that has a trigger or foreign key constraint attached to the column. The table school_info_l has many contraints that affect other tables however > Also, is it always the same number in the error, or does that change > from run to run? The number is the same for each time I run the update file on the same database. with this two queries having the same error. Same result to, if I run these two after the first update file finishes there is no problem, but if I try to run it at the end of hte first file, choke. Very Odd problem to me, since the update statemenets are so simple. -Tom
Thomas Seeber <thomas.seeber@gmail.com> writes: >>> I am getting two errors which are a bit confounding. >>> ERROR: pg_class_aclcheck:relation 474653086 not found >> How about triggers? Foreign keys? Rules? > Neither of the updates touch any rules. > sis_system_id has a foreign key constaint to another table that does > in it contain a value of 9 for sis_system_id in that table, but the > first isnt touching anything that has a trigger or foreign key > constraint attached to the column. > The table school_info_l has many contraints that affect other tables however I would guess that one or another of these foreign-key constraints is broken. I'd suggest looking through pg_trigger to see if there are any entries with tgconstrrelid = 474653086. I wouldn't necessarily recommend just deleting such an entry, mind you, but finding where the problem is is the first step... regards, tom lane
> Original 7.3 release, or (I hope) 7.3.something? 7.3 > > I am getting two errors which are a bit confounding. > > ERROR: pg_class_aclcheck:relation 474653086 not found > > Are there any views involved? No views. Is the statement invoking any functions? The statement is not invoking any fuctions However heres the statements, UPDATE school_info_l SET ind_default_data = 't'; UPDATE school_info_l SET sis_system_id = 9 where school_id IN (492, 434, 436); which are amazingly simple. Both queries return the same exact error, same error. not your > How about triggers? Foreign keys? Rules?Neither of the updates touch any rules. sis_system_id is a foreign key to another table (but the first isnt touching anything that has a trigger or foreign key constraint attached to the column. The table school_info_l has many contraints that affect other tables however > Also, is it always the same number in the error, or does that change > from run to run? The number is the same for each time I run the update file on the same database. with this two queries having the same error. Same result to, if I run these two after the first update file finishes there is no problem, but if I try to run it at the end of hte first file, choke. Very Odd problem to me, since the update statemenets are so simple. -Tom