From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Patrick Krecker <pkrecker(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: TODO item: WAL replay of CREATE TABLESPACE with differing directory structure |
Date: | 2018-02-19 03:28:37 |
Message-ID: | 20180219032837.GD8332@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)paquier(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2018-02-19 03:38:32 | Re: spelling of enable_partition_wise_join |
Previous Message | Craig Ringer | 2018-02-19 03:21:49 | Re: Documenting PROVE_TESTS in section of TAP tests |