Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 99FFA2E002C for ; Tue, 8 Apr 2008 11:07:13 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 89218-01-5 for ; Tue, 8 Apr 2008 11:06:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by developer.postgresql.org (Postfix) with ESMTP id 46BD32E00FC for ; Tue, 8 Apr 2008 11:04:00 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m38E3wof000450; Tue, 8 Apr 2008 10:03:59 -0400 (EDT) To: Marc Cousin cc: pgsql-admin@postgresql.org Subject: Re: cannot restore a view after a dump In-reply-to: <200804080911.56042.mcousin@sigma.fr> References: <200804041022.31746.mcousin@sigma.fr> <200804041521.52137.mcousin@sigma.fr> <200804080911.56042.mcousin@sigma.fr> Comments: In-reply-to Marc Cousin message dated "Tue, 08 Apr 2008 09:11:55 +0200" Date: Tue, 08 Apr 2008 10:03:58 -0400 Message-ID: <448.1207663438@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/76 X-Sequence-Number: 28840 Marc Cousin writes: > Sorry to post again, but I feel this issue is a bit strange and I'd like to > understand it. The problem is that I've got the same query that runs > sometimes, and fails with a syntax error at other times... It's the first > time I've seen it, and I've been using PostgreSQL for a while now ... Oh, sorry for not replying directly to you. This was analyzed over in -hackers and we now understand the cause, but haven't a fix quite yet: http://archives.postgresql.org/pgsql-hackers/2008-04/msg00278.php It's been broken since approximately forever, so if you'd been using that view definition for awhile I'm surprised you didn't run into the problem before. The reason for the erratic behavior is that it depends on what happened to already be in the chunks of memory used to form the array constants. In a freshly-started backend the view creation would probably always succeed, but as soon as memory has gotten dirtied a bit, maybe not. regards, tom lane