Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XlTG6-0000zD-Sv for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Nov 2014 01:50:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XlTG6-0002e9-A1 for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Nov 2014 01:50:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XlTG5-0002dO-Jh for pgsql-bugs@postgresql.org; Tue, 04 Nov 2014 01:50:09 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XlTFz-0003Wx-Ag for pgsql-bugs@postgresql.org; Tue, 04 Nov 2014 01:50:08 +0000 MIME-Version: 1.0 Subject: BUG #11867: Strange behaviour with composite types after resetting database tablespace To: pgsql-bugs@postgresql.org From: marc@bloodnok.com Date: Tue, 04 Nov 2014 01:49:57 +0000 Message-ID: <20141104014957.23088.78673@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 11867 Logged by: Marc Munro Email address: marc@bloodnok.com PostgreSQL version: 9.3.5 Operating system: Linux Debian 7.6 (Wheezy) on x86_64 Description: I have a script (below) that sets and resets the tablespace for a database and drops and recreates a composite type. The script fails when trying to re-create the previously dropped composite type because the type has apparently been magically resuscitated by changing the tablespace for the database. I assume this is a bug. I have reproduced this on postgres 8.4 and 9.3 This is not mission-critical for me but I'd be grateful for suggestions for work-arounds. I am running Debian Wheezy (release 7.6) on x86_64, with the following postgres versions: PostgreSQL 9.3.5 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit PostgreSQL 8.4.22 on x86_64-unknown-linux-gnu, compiled by GCC gcc (Debian 4.7.2-5) 4.7.2, 64-bit ---Shell script follows--- TBS3="/var/lib/postgresql/8.4/main/tbs3" #TBS3="/var/lib/postgresql/9.3/main/tbs3" psql -d postgres -v tbs3=$TBS3 <<'CLUSTEREOF' \set tbs3dir '''':tbs3'''' create tablespace "tbs3" location :tbs3dir; create database "regressdb" with encoding 'UTF8' tablespace "tbs3" connection limit = -1; CLUSTEREOF psql -d regressdb <<'DBEOF' create type "public"."vv2_t" as ( "name" "pg_catalog"."text", "type" "pg_catalog"."text", "shared" "pg_catalog"."bool" ); DBEOF psql -d postgres <<'CLUSTEREOF' alter database regressdb set tablespace pg_default; CLUSTEREOF psql -d regressdb <<'DBEOF' drop type public.vv2_t; DBEOF psql -d postgres <<'CLUSTEREOF' alter database regressdb set tablespace tbs3; CLUSTEREOF psql -d regressdb <<'DBEOF' create type public.vv2_t as ( name pg_catalog.text, type pg_catalog.text, shared pg_catalog.bool); DBEOF ---Shell script ends--- __ Marc -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs