Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TEkfn-0007pW-9H for pgsql-admin@postgresql.org; Thu, 20 Sep 2012 17:36:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TEkfm-0008SL-CE for pgsql-admin@postgresql.org; Thu, 20 Sep 2012 17:36:22 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q8KHaKJR026933; Thu, 20 Sep 2012 13:36:21 -0400 (EDT) From: Tom Lane To: =?iso-8859-1?Q?Rub=E9n_Crespo_Flores?= cc: pgsql-admin@postgresql.org Subject: Re: Problem creating temporary tables . . . In-reply-to: References: <6F6C406D-518A-4E6F-ACE9-D234B6EB2418@gmail.com> <11992.1348090218@sss.pgh.pa.us> Comments: In-reply-to =?iso-8859-1?Q?Rub=E9n_Crespo_Flores?= message dated "Wed, 19 Sep 2012 18:21:37 -0500" Date: Thu, 20 Sep 2012 13:36:20 -0400 Message-ID: <26932.1348162580@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) X-Archive-Number: 201209/115 X-Sequence-Number: 40056 =?iso-8859-1?Q?Rub=E9n_Crespo_Flores?= writes: >>> ERROR: could not find tuple for attrdef 299038853 >>> SQL state: XX000 >>> Context: SQL statement "create temporary table tmp_tablatotlin15 (... >> Hm ... that's a bit odd, but try reindexing pg_attrdef. > I tried reindexing pg_attrdef and pg_attribute but the result was the same. There's something awfully odd about that. A look in the 9.0 sources says that that specific error text only appears in RemoveAttrDefault and getObjectDescription - and the latter is only used in error messages. It's not apparent why a CREATE TABLE operation would either be dropping column defaults or issuing error messages that cite an already-existing default. Could you show a complete example of this behavior? BTW, please keep the mailing list cc'd, so that more people can help you. regards, tom lane