Skip site navigation (1) Skip section navigation (2)

Re: create tablespace fails silently, or succeeds improperly

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: create tablespace fails silently, or succeeds improperly
Date: 2010-10-18 18:35:21
Message-ID: AANLkTikTxUW6JNSfkBGo_2VaUEDy-2cs1wEpDViw-U4L@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Oct 18, 2010 at 2:20 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Alvaro Herrera wrote:
>> Hi Dave,
>>
>> Excerpts from Dave Cramer's message of lun oct 18 12:23:40 -0300 2010:
>> > as seen below create tablespace does not throw an error or appear to
>> > do anything other than register the tablespace.
>> >
>> > postgres(at)db01:~> less /opt/pg/data/jnj_indexes/PG_VERSION
>> > 8.4
>> > postgres(at)db01:~> /opt/pg91/bin/psql -p 5433
>> > psql (9.0.1)
>> > Type "help" for help.
>> >
>> > postgres=# select version();
>> >                                                       version
>> > -------------------------------------------------------------------------------------------------------------------
>> >  PostgreSQL 9.0.1 on x86_64-unknown-linux-gnu, compiled by GCC gcc
>> > (GCC) 3.4.6 20060404 (Red Hat 3.4.6-11), 64-bit
>> > (1 row)
>> >
>> > postgres=# create TABLESPACE jnj_indexes location '/opt/pg/data/jnj_indexes';
>> > CREATE TABLESPACE
>>
>> IIRC the reason this works is that the tablespace code now creates a
>> version-specific subdirectory inside the specified directory.  This was
>> done to help binary upgrades.
>
> Right, the directory is catalog-version named, which was done to allow
> for pg_upgrade to work for alpha/beta upgrades (pretty cool).  The case
> above happened because 8.4 still has data in that tablespace.
> pg_upgrade does supply a script to delete old data files, but it was not
> used in the case above.
>

right that's because I did not use pg_upgrade. I was manually running
create tablespace.

Dave

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2010-10-18 18:39:47
Subject: Re: create tablespace fails silently, or succeeds improperly
Previous:From: Bruce MomjianDate: 2010-10-18 18:29:15
Subject: Re: create tablespace fails silently, or succeeds improperly

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group