From: | marc(at)bloodnok(dot)com |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #11867: Strange behaviour with composite types after resetting database tablespace |
Date: | 2014-11-04 01:49:57 |
Message-ID: | 20141104014957.23088.78673@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
The following bug has been logged on the website:
Bug reference: 11867
Logged by: Marc Munro
Email address: marc(at)bloodnok(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-11-04 03:08:04 | Re: BUG #11867: Strange behaviour with composite types after resetting database tablespace |
Previous Message | Saul Costa | 2014-11-03 21:23:58 | PostgreSQL 9.3 Segfault in "hstore_to_json" function |
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2014-11-04 01:52:41 | Re: Let's drop two obsolete features which are bear-traps for novices |
Previous Message | Demai Ni | 2014-11-04 01:40:38 | [PG-XC] how to pass a value(String) from coordinator node to all data nodes |