Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 6B09E1641FB for ; Mon, 14 Nov 2011 19:21:28 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 56593-07 for ; Mon, 14 Nov 2011 23:21:22 +0000 (UTC) X-Greylist: delayed 00:07:26.612422 by SQLgrey-1.8.0-rc2 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 639D81641F9 for ; Mon, 14 Nov 2011 19:21:22 -0400 (AST) Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RQ5it-0004qY-Gq for pgsql-bugs@postgresql.org; Mon, 14 Nov 2011 23:13:56 +0000 Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id pAENDep01085; Mon, 14 Nov 2011 18:13:40 -0500 (EST) From: Bruce Momjian Message-Id: <201111142313.pAENDep01085@momjian.us> Subject: Re: Cannot dump 8.4.8 database using later versions In-Reply-To: <4EC1A01B.6000802@agliodbs.com> To: Josh Berkus Date: Mon, 14 Nov 2011 18:13:40 -0500 (EST) CC: pgsql-bugs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201111/102 X-Sequence-Number: 31697 Josh Berkus wrote: > Severity: normal > > Versions tested: 9.0.4 and 9.1.1 > Installed from packages on Ubuntu > > Reproduceability: 100% on this server > have not tried a test case yet > > Steps: > > 1. large running 8.4.8 PostgreSQL database > > 2. /usr/lib/postgresql/9.1/bin/pg_dump -Fc -v -f test.dump dbname > > 3. dumps all table etc definitions correctly. then: > > pg_dump: saving database definition > pg_dump: SQL command failed > pg_dump: Error message from server: ERROR: NEW used in query that is > not in a rule > LINE 1: ...END AS min_value, cache_value, is_cycled, is_called from new > ^ > pg_dump: The command was: SELECT sequence_name, start_value, last_value, > increment_by, CASE WHEN increment_by > 0 AND max_value = > 9223372036854775807 THEN NULL WHEN increment_by < 0 AND max_value = > -1 THEN NULL ELSE max_value END AS max_value, CASE WHEN > increment_by > 0 AND min_value = 1 THEN NULL WHEN increment_by < 0 > AND min_value = -9223372036854775807 THEN NULL ELSE min_value END > AS min_value, cache_value, is_cycled, is_called from new > > (yes, that is the entire query, I checked the logs) > > ... somehow the query to dump the sequences is getting mangled. Any > clue how? Seems you have a sequence called "new"; seems we don't handle that well. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +