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

Re: create tablespace fails silently, or succeeds improperly

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
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:57:11
Message-ID: 201010181857.o9IIvBj08330@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Dave Cramer wrote:
> >> >> 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.
> >
> > OK, so you were sharing the tablespace with old and new clusters. ?You
> > are right that in the past that would not have been possible because
> > PG_VERSION would have conflicted, but it is now possible with all new
> > releases because of the catalog-version-named subdirectory. ?That seems
> > like I a feature, I guess.
> >
> 
> Sounds unintended. As it turns out I was expecting it to fail and was
> surprised when it succeeded.

Well, it was intended, or rather required by pg_upgrade.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-10-18 18:59:19
Subject: Re: create tablespace fails silently, or succeeds improperly
Previous:From: Bruce MomjianDate: 2010-10-18 18:56:03
Subject: Re: create tablespace fails silently, or succeeds improperly

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