Re: TODO item: WAL replay of CREATE TABLESPACE with differingdirectory structure

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: TODO item: WAL replay of CREATE TABLESPACE with differingdirectory structure
Дата
Msg-id 20180219032837.GD8332@paquier.xyz
обсуждение исходный текст
Ответ на Re: TODO item: WAL replay of CREATE TABLESPACE with differingdirectory structure  (Patrick Krecker <pkrecker@gmail.com>)
Список pgsql-hackers
On Sun, Feb 18, 2018 at 04:43:38PM -0800, Patrick Krecker wrote:
> On Tue, Feb 13, 2018 at 8:24 PM, Michael Paquier <michael@paquier.xyz> wrote:
>> Let's be clear here. There is no hard restriction with tablespace paths
>> within the data directory, though you should not do that, and you get a
>> nice warning when trying to do so with CREATE TABLESPACE (see 33cb8ff6).
>> This also causes pg_basebackup to fail.  It is also bad design to create
>> tablespaces within the data directory as those are aimed at making hot
>> paths work on different partitions with different I/O properties.
>
> Sorry, my language was imprecise here. What I meant is that the
> pg_tablespace directory contains no symlinks when a tablespace
> creation is streamed to a replica, i.e. the data files reside within
> pg_tablespace on the replica.

There is nothing preventing you to do so I think, and base backups
should work properly as basebackup.c just loops through the paths of the
tablespace links, which leads to errors if the links are within the data
folder itself.  I don't think that we would want a mode where CREATE
TABLESPACE does not create a link at recovery as well, be it controlled
by a system-wide GUC or a switch at DDL level.  That's more likely to
trap users by putting hot data on the same partition as the data folder.

> Thank you for the response. I would suggest that we link to it from
> the wiki so as to provide clarification to future readers of the todo
> list.

Good idea!  I have just updated the wiki page with a link to my previous
post.
--
Michael

Вложения

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Documenting PROVE_TESTS in section of TAP tests
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: spelling of enable_partition_wise_join