Re: create tablespace fails silently, or succeeds improperly

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: create tablespace fails silently, or succeeds improperly
Дата
Msg-id AANLkTi=h_Khnkq+_5c=jYsnOr_7=jEZCzEdhr4m0fmQg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: create tablespace fails silently, or succeeds improperly  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: create tablespace fails silently, or succeeds improperly  (Bruce Momjian <bruce@momjian.us>)
Re: create tablespace fails silently, or succeeds improperly  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Mon, Oct 18, 2010 at 2:39 PM, Bruce Momjian <bruce@momjian.us> wrote:
> Dave Cramer wrote:
>> On Mon, Oct 18, 2010 at 2:20 PM, Bruce Momjian <bruce@momjian.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@db01:~> less /opt/pg/data/jnj_indexes/PG_VERSION
>> >> > 8.4
>> >> > postgres@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.
>
> 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.


Dave


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: create tablespace fails silently, or succeeds improperly
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Floating-point timestamps versus Range Types